1
0
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:
Bram Moolenaar
2017-07-01 23:11:17 +02:00
parent a83fe75ca7
commit da5116da45
3 changed files with 44 additions and 0 deletions

View File

@@ -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 */