From 6130b4a84b41b71f4c0c58093a29585c6c67ff16 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 13 Jun 2022 20:20:34 +0800 Subject: 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. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32 --- src/nvim/window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/nvim/window.c') diff --git a/src/nvim/window.c b/src/nvim/window.c index e08db2261b..95796b29a1 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -569,7 +569,7 @@ wingotofile: case 'f': // CTRL-W gf: "gf" in a new tab page case 'F': // CTRL-W gF: "gF" in a new tab page - cmdmod.tab = tabpage_index(curtab) + 1; + cmdmod.cmod_tab = tabpage_index(curtab) + 1; nchar = xchar; goto wingotofile; case 't': // CTRL-W gt: go to next tab page @@ -985,7 +985,7 @@ int win_split(int size, int flags) } // Add flags from ":vertical", ":topleft" and ":botright". - flags |= cmdmod.split; + flags |= cmdmod.cmod_split; if ((flags & WSP_TOP) && (flags & WSP_BOT)) { emsg(_("E442: Can't split topleft and botright at the same time")); return FAIL; @@ -3882,7 +3882,7 @@ void close_others(int message, int forceit) continue; } if (!r) { - if (message && (p_confirm || cmdmod.confirm) && p_write) { + if (message && (p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write) { dialog_changed(wp->w_buffer, false); if (!win_valid(wp)) { // autocommands messed wp up nextwp = firstwin; @@ -4136,10 +4136,10 @@ int win_new_tabpage(int after, char_u *filename) */ int may_open_tabpage(void) { - int n = (cmdmod.tab == 0) ? postponed_split_tab : cmdmod.tab; + int n = (cmdmod.cmod_tab == 0) ? postponed_split_tab : cmdmod.cmod_tab; if (n != 0) { - cmdmod.tab = 0; // reset it to avoid doing it twice + cmdmod.cmod_tab = 0; // reset it to avoid doing it twice postponed_split_tab = 0; return win_new_tabpage(n, NULL); } -- cgit