diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 09:09:00 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 10:07:05 +0800 |
| commit | 46e4be0fd0002233bde613295607ce5eeb498567 (patch) | |
| tree | 4e12bbbb51cca63f4f745c6061139768a381380b /src/nvim/search.c | |
| parent | a91ba088abf7b21f640f671ad7f211c0957b4765 (diff) | |
| download | rneovim-46e4be0fd0002233bde613295607ce5eeb498567.tar.gz rneovim-46e4be0fd0002233bde613295607ce5eeb498567.tar.bz2 rneovim-46e4be0fd0002233bde613295607ce5eeb498567.zip | |
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)
https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35
Diffstat (limited to 'src/nvim/search.c')
| -rw-r--r-- | src/nvim/search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index cb10dfbc4a..842927e60c 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -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)); |