1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2020-10-24 20:49:43 +02:00
parent 5661ed6c83
commit e100440158
38 changed files with 284 additions and 271 deletions

View File

@@ -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);