From 198cb66d652d3d8ac16226dcc929a11b0b720151 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 6 Sep 2018 21:44:17 +0200 Subject: patch 8.1.0351: 'incsearch' for :/foo/s// changes last search pattern Problem: 'incsearch' for :/foo/s// changes last search pattern. Solution: Save the last search pattern earlier. --- src/ex_docmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ex_docmd.c') diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 5b53785cc5..767791776e 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2911,6 +2911,7 @@ 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 @@ -4436,10 +4437,11 @@ skip_range( } /* - * get a single EX address + * 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. */ -- cgit v1.2.3