summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-24 20:49:43 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-24 20:49:43 +0200
commite10044015841711b989f9a898d427bcc1fdb4c32 (patch)
tree256dbf4f826bbc408bb1eca2b381c4dc4f953eb6 /src/memline.c
parent5661ed6c833e05467cab33cb9b1c535e7e5cc570 (diff)
downloadvim-git-e10044015841711b989f9a898d427bcc1fdb4c32.tar.gz
patch 8.2.1898: command modifier parsing always uses global cmdmodv8.2.1898
Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/memline.c b/src/memline.c
index 54f8c19b0..e0a49cb7e 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -289,7 +289,7 @@ ml_open(buf_T *buf)
buf->b_ml.ml_chunksize = NULL;
#endif
- if (cmdmod.noswapfile)
+ if (cmdmod.cmod_flags & CMOD_NOSWAPFILE)
buf->b_p_swf = FALSE;
/*
@@ -635,7 +635,7 @@ ml_setname(buf_T *buf)
* When 'updatecount' is 0 and 'noswapfile' there is no swap file.
* For help files we will make a swap file now.
*/
- if (p_uc != 0 && !cmdmod.noswapfile)
+ if (p_uc != 0 && (cmdmod.cmod_flags & CMOD_NOSWAPFILE) == 0)
ml_open_file(buf); // create a swap file
return;
}
@@ -747,7 +747,8 @@ ml_open_file(buf_T *buf)
char_u *dirp;
mfp = buf->b_ml.ml_mfp;
- if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf || cmdmod.noswapfile)
+ if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf
+ || (cmdmod.cmod_flags & CMOD_NOSWAPFILE))
return; // nothing to do
#ifdef FEAT_SPELL