aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-14 21:57:08 +0800
committerGitHub <noreply@github.com>2022-06-14 21:57:08 +0800
commit8ba64dd3ad1822efd6f986349e99f5f85afd7be7 (patch)
tree66b2987707cf6616614fb251d7e342ccdfd96c28 /src/nvim/fileio.c
parent2a2fb8be74f9147773416be63334ea6a74c66869 (diff)
parent0a0cda95286bf62fbce2776a0c0081cea39a88a8 (diff)
downloadrneovim-8ba64dd3ad1822efd6f986349e99f5f85afd7be7.tar.gz
rneovim-8ba64dd3ad1822efd6f986349e99f5f85afd7be7.tar.bz2
rneovim-8ba64dd3ad1822efd6f986349e99f5f85afd7be7.zip
Merge pull request #18947 from zeertzjq/vim-8.2.1897
vim-patch:8.2.{1897,1898,5088}
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 8d8c10f823..4c1dd63b8f 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -1890,7 +1890,7 @@ failed:
check_cursor_lnum();
beginline(BL_WHITE | BL_FIX); // on first non-blank
- if (!cmdmod.lockmarks) {
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) {
// Set '[ and '] marks to the newly read lines.
curbuf->b_op_start.lnum = from + 1;
curbuf->b_op_start.col = 0;
@@ -2425,7 +2425,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en
if (buf == NULL || (buf->b_ml.ml_mfp == NULL && !empty_memline)
|| did_cmd || nofile_err
|| aborting()) {
- if (buf != NULL && cmdmod.lockmarks) {
+ if (buf != NULL && (cmdmod.cmod_flags & CMOD_LOCKMARKS)) {
// restore the original '[ and '] positions
buf->b_op_start = orig_start;
buf->b_op_end = orig_end;
@@ -2511,7 +2511,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en
}
}
- if (cmdmod.lockmarks) {
+ if (cmdmod.cmod_flags & CMOD_LOCKMARKS) {
// restore the original '[ and '] positions
buf->b_op_start = orig_start;
buf->b_op_end = orig_end;