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.
diff --git a/src/help.c b/src/help.c
index b361bb3..d6bdcbb 100644
--- a/src/help.c
+++ b/src/help.c
@@ -123,9 +123,9 @@
// Re-use an existing help window or open a new one.
// Always open a new one for ":tab help".
- if (!bt_help(curwin->w_buffer) || cmdmod.tab != 0)
+ if (!bt_help(curwin->w_buffer) || cmdmod.cmod_tab != 0)
{
- if (cmdmod.tab != 0)
+ if (cmdmod.cmod_tab != 0)
wp = NULL;
else
FOR_ALL_WINDOWS(wp)
@@ -148,7 +148,7 @@
// specified, the current window is vertically split and
// narrow.
n = WSP_HELP;
- if (cmdmod.split == 0 && curwin->w_width != Columns
+ if (cmdmod.cmod_split == 0 && curwin->w_width != Columns
&& curwin->w_width < 80)
n |= WSP_TOP;
if (win_split(0, n) == FAIL)
@@ -164,7 +164,7 @@
(void)do_ecmd(0, NULL, NULL, NULL, ECMD_LASTL,
ECMD_HIDE + ECMD_SET_HELP,
NULL); // buffer is still open, don't store info
- if (!cmdmod.keepalt)
+ if ((cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
curwin->w_alt_fnum = alt_fnum;
empty_fnum = curbuf->b_fnum;
}
@@ -193,7 +193,8 @@
}
// keep the previous alternate file
- if (alt_fnum != 0 && curwin->w_alt_fnum == empty_fnum && !cmdmod.keepalt)
+ if (alt_fnum != 0 && curwin->w_alt_fnum == empty_fnum
+ && (cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
curwin->w_alt_fnum = alt_fnum;
erret: