mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
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)
da5116da45
This commit is contained in:
@@ -1063,6 +1063,13 @@ static void command_line_next_incsearch(CommandLineState *s, bool next_match)
|
||||
s->search_start = t;
|
||||
(void)decl(&s->search_start);
|
||||
}
|
||||
else if (next_match && s->firstc == '?') {
|
||||
// move just after the current match, so that
|
||||
// when nv_search finishes the cursor will be
|
||||
// put back on the match
|
||||
s->search_start = t;
|
||||
(void)incl(&s->search_start);
|
||||
}
|
||||
if (lt(t, s->search_start) && next_match) {
|
||||
// wrap around
|
||||
s->search_start = t;
|
||||
|
Reference in New Issue
Block a user