aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 81d89ef3df..21b0ab89d7 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -264,7 +264,7 @@ int ml_open(buf_T *buf)
buf->b_ml.ml_chunksize = NULL;
buf->b_ml.ml_usedchunks = 0;
- if (cmdmod.noswapfile) {
+ if (cmdmod.cmod_flags & CMOD_NOSWAPFILE) {
buf->b_p_swf = false;
}
@@ -391,7 +391,7 @@ void 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;
@@ -475,7 +475,8 @@ void 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)
|| buf->terminal) {
return; // nothing to do
}