mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.0278: 'incsearch' highlighting does not accept reverse range
Problem: 'incsearch' highlighting does not accept reverse range. Solution: Swap the range when needed. (issue #3321)
This commit is contained in:
@@ -320,8 +320,17 @@ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
|
||||
parse_cmd_address(&ea, &dummy);
|
||||
if (ea.addr_count > 0)
|
||||
{
|
||||
search_first_line = ea.line1;
|
||||
search_last_line = ea.line2;
|
||||
// Allow for reverse match.
|
||||
if (ea.line2 < ea.line1)
|
||||
{
|
||||
search_first_line = ea.line2;
|
||||
search_last_line = ea.line1;
|
||||
}
|
||||
else
|
||||
{
|
||||
search_first_line = ea.line1;
|
||||
search_last_line = ea.line2;
|
||||
}
|
||||
}
|
||||
else if (*cmd == 's')
|
||||
{
|
||||
|
Reference in New Issue
Block a user