diff options
author | Aufar Gilbran <aufargilbran@gmail.com> | 2020-08-19 00:51:24 +0800 |
---|---|---|
committer | Aufar Gilbran <aufargilbran@gmail.com> | 2020-09-11 10:37:52 +0800 |
commit | e2dc2a6bd751f5614fb7f51a2bd1bc28c3bf4530 (patch) | |
tree | 9445c62f3d1ca75f4436261b129aab19d1c3caeb /src/nvim/ex_docmd.c | |
parent | b59c293c25dce6387c939d536c4d7b0f98d83d9e (diff) | |
download | rneovim-e2dc2a6bd751f5614fb7f51a2bd1bc28c3bf4530.tar.gz rneovim-e2dc2a6bd751f5614fb7f51a2bd1bc28c3bf4530.tar.bz2 rneovim-e2dc2a6bd751f5614fb7f51a2bd1bc28c3bf4530.zip |
vim-patch:8.1.0351: 'incsearch' for :/foo/s//<Esc> changes last search pattern
Problem: 'incsearch' for :/foo/s//<Esc> changes last search pattern.
Solution: Save the last search pattern earlier.
https://github.com/vim/vim/commit/198cb66d652d3d8ac16226dcc929a11b0b720151
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index faafd511b1..78d46ad5ee 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2301,6 +2301,7 @@ static void free_cmdmod(void) // Parse the address range, if any, in "eap". +// May set the last search pattern. // Return FAIL and set "errormsg" or return OK. int parse_cmd_address(exarg_T *eap, char_u **errormsg) FUNC_ATTR_NONNULL_ALL @@ -3683,14 +3684,13 @@ char_u *skip_range( return (char_u *)cmd; } -/* - * get a single EX address - * - * Set ptr to the next character after the part that was interpreted. - * Set ptr to NULL when an error is encountered. - * - * Return MAXLNUM when no Ex address was found. - */ +// Get a single EX address +// +// Set ptr to the next character after the part that was interpreted. +// Set ptr to NULL when an error is encountered. +// This may set the last used search pattern. +// +// Return MAXLNUM when no Ex address was found. static linenr_T get_address(exarg_T *eap, char_u **ptr, int addr_type, // flag: one of ADDR_LINES, ... |