diff src/search.c @ 22699:e82579016863 v8.2.1898

patch 8.2.1898: command modifier parsing always uses global cmdmod Commit: https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 24 20:49:43 2020 +0200 patch 8.2.1898: command modifier parsing always uses global cmdmod Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Oct 2020 21:00:05 +0200
parents f8bf2c122452
children 875bd7c04533
line wrap: on
line diff
--- a/src/search.c
+++ b/src/search.c
@@ -189,7 +189,8 @@ search_regcomp(
      * Save the currently used pattern in the appropriate place,
      * unless the pattern should not be remembered.
      */
-    if (!(options & SEARCH_KEEP) && !cmdmod.keeppatterns)
+    if (!(options & SEARCH_KEEP)
+			       && (cmdmod.cmod_flags & CMOD_KEEPPATTERNS) == 0)
     {
 	// search or global command
 	if (pat_save == RE_SEARCH || pat_save == RE_BOTH)
@@ -1661,7 +1662,7 @@ do_search(
     curwin->w_set_curswant = TRUE;
 
 end_do_search:
-    if ((options & SEARCH_KEEP) || cmdmod.keeppatterns)
+    if ((options & SEARCH_KEEP) || (cmdmod.cmod_flags & CMOD_KEEPPATTERNS))
 	spats[0].off = old_off;
     vim_free(strcopy);
     vim_free(msgbuf);