0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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

@@ -195,7 +195,7 @@ do_incsearch_highlighting(
int *patlen)
{
char_u *cmd;
cmdmod_T save_cmdmod = cmdmod;
cmdmod_T dummy_cmdmod;
char_u *p;
int delim_optional = FALSE;
int delim;
@@ -231,8 +231,8 @@ do_incsearch_highlighting(
ea.cmd = ccline.cmdbuff;
ea.addr_type = ADDR_LINES;
parse_command_modifiers(&ea, &dummy, TRUE);
cmdmod = save_cmdmod;
CLEAR_FIELD(dummy_cmdmod);
parse_command_modifiers(&ea, &dummy, &dummy_cmdmod, TRUE);
cmd = skip_range(ea.cmd, TRUE, NULL);
if (vim_strchr((char_u *)"sgvl", *cmd) == NULL)
@@ -4163,8 +4163,8 @@ open_cmdwin(void)
pum_undisplay();
// don't use a new tab page
cmdmod.tab = 0;
cmdmod.noswapfile = 1;
cmdmod.cmod_tab = 0;
cmdmod.cmod_flags |= CMOD_NOSWAPFILE;
// Create a window for the command-line buffer.
if (win_split((int)p_cwh, WSP_BOT) == FAIL)