From e10044015841711b989f9a898d427bcc1fdb4c32 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 24 Oct 2020 20:49:43 +0200 Subject: 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. --- src/ex_cmds2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ex_cmds2.c') diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 738bdb11d..04859ada7 100644 --- 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() -- cgit v1.2.1