forked from aniani/vim
patch 8.0.0692: CTRL-G with 'incsearch' and ? goes in the wrong direction
Problem: Using CTRL-G with 'incsearch' and ? goes in the wrong direction. (Ramel Eshed) Solution: Adjust search_start. (Christian Brabandt)
This commit is contained in:
@@ -1708,6 +1708,14 @@ getcmdline(
|
||||
search_start = t;
|
||||
(void)decl(&search_start);
|
||||
}
|
||||
else if (c == Ctrl_G && firstc == '?')
|
||||
{
|
||||
/* move just after the current match, so that
|
||||
* when nv_search finishes the cursor will be
|
||||
* put back on the match */
|
||||
search_start = t;
|
||||
(void)incl(&search_start);
|
||||
}
|
||||
if (LT_POS(t, search_start) && c == Ctrl_G)
|
||||
{
|
||||
/* wrap around */
|
||||
|
Reference in New Issue
Block a user