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/ex_cmds2.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/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index d4555f9917..9b260f9091 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -506,7 +506,7 @@ bool check_changed(buf_T *buf, int flags) && bufIsChanged(buf) && ((flags & CCGD_MULTWIN) || buf->b_nwindows <= 1) && (!(flags & CCGD_AW) || autowrite(buf, forceit) == FAIL)) { - if ((p_confirm || cmdmod.confirm) && p_write) { + if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write) { int count = 0; if (flags & CCGD_ALLBUF) { @@ -719,7 +719,7 @@ bool check_changed_any(bool hidden, bool unload) ret = true; exiting = false; // When ":confirm" used, don't give an error message. - if (!(p_confirm || cmdmod.confirm)) { + if (!(p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM))) { // There must be a wait_return for this message, do_buffer() // may cause a redraw. But wait_return() is a no-op when vgetc() // is busy (Quit used from window menu), then make sure we don't @@ -1127,7 +1127,7 @@ void do_argfile(exarg_T *eap, int argn) setpcmark(); // split window or create new tab page first - if (*eap->cmd == 's' || cmdmod.tab != 0) { + if (*eap->cmd == 's' || cmdmod.cmod_tab != 0) { if (win_split(0, 0) == FAIL) { return; } @@ -3027,7 +3027,7 @@ void ex_drop(exarg_T *eap) return; } - if (cmdmod.tab) { + if (cmdmod.cmod_tab) { // ":tab drop file ...": open a tab for each argument that isn't // edited in a window yet. It's like ":tab all" but without closing // windows or tabs. |