Mercurial > vim
diff src/ex_cmds2.c @ 22699:e82579016863 v8.2.1898
patch 8.2.1898: command modifier parsing always uses global cmdmod
Commit: https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 24 20:49:43 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Oct 2020 21:00:05 +0200 |
parents | b32b67a108f2 |
children | 078edc1821bf |
line wrap: on
line diff
--- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -86,7 +86,7 @@ check_changed(buf_T *buf, int flags) && (!(flags & CCGD_AW) || autowrite(buf, forceit) == FAIL)) { #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) - if ((p_confirm || cmdmod.confirm) && p_write) + if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write) { buf_T *buf2; int count = 0; @@ -96,7 +96,7 @@ check_changed(buf_T *buf, int flags) if (bufIsChanged(buf2) && (buf2->b_ffname != NULL # ifdef FEAT_BROWSE - || cmdmod.browse + || (cmdmod.cmod_flags & CMOD_BROWSE) # endif )) ++count; @@ -197,7 +197,7 @@ dialog_changed( if (bufIsChanged(buf2) && (buf2->b_ffname != NULL #ifdef FEAT_BROWSE - || cmdmod.browse + || (cmdmod.cmod_flags & CMOD_BROWSE) #endif ) && !buf2->b_p_ro) @@ -347,7 +347,7 @@ check_changed_any( /* * When ":confirm" used, don't give an error message. */ - if (!(p_confirm || cmdmod.confirm)) + if (!(p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM))) #endif { // There must be a wait_return for this message, do_buffer()