diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-13 20:20:34 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-06-14 20:58:34 +0800 |
commit | 6130b4a84b41b71f4c0c58093a29585c6c67ff16 (patch) | |
tree | 021564ddd896004b20ebaf2f3686e18c1b6be201 /src/nvim/window.c | |
parent | dad898b665b77feaec57acc2812faa7ff0ab619e (diff) | |
download | rneovim-6130b4a84b41b71f4c0c58093a29585c6c67ff16.tar.gz rneovim-6130b4a84b41b71f4c0c58093a29585c6c67ff16.tar.bz2 rneovim-6130b4a84b41b71f4c0c58093a29585c6c67ff16.zip |
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
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); } |