mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
vim-patch:8.2.2295: incsearch does not detect empty pattern properly
Problem: Incsearch does not detect empty pattern properly.
Solution: Return magic state when skipping over a pattern. (Christian
Brabandt, closes vim/vim#7612, closes vim/vim#6420)
d93a7fc1a9
This commit is contained in:
@@ -1089,7 +1089,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, long count, i
|
||||
// Find end of regular expression.
|
||||
// If there is a matching '/' or '?', toss it.
|
||||
ps = (char_u *)strcopy;
|
||||
p = skip_regexp_ex(pat, search_delim, magic_isset(), &strcopy, NULL);
|
||||
p = skip_regexp_ex(pat, search_delim, magic_isset(), &strcopy, NULL, NULL);
|
||||
if (strcopy != (char *)ps) {
|
||||
// made a copy of "pat" to change "\?" to "?"
|
||||
searchcmdlen += (int)(strlen(pat) - strlen(strcopy));
|
||||
|
Reference in New Issue
Block a user