summaryrefslogtreecommitdiffstats
path: root/src/bufwrite.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-23 22:01:26 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-23 22:01:26 +0100
commit8e6be34338f13a6a625f19bcef82019c9adc65f2 (patch)
treee0dae3d62557da389976a5bc9c807ed9f417f344 /src/bufwrite.c
parent142f23544c7045b22e56fa6ee35808aceb6342f2 (diff)
patch 8.2.2039: viminfo is not written when creating a new filev8.2.2039
Problem: Viminfo is not written when creating a new file. Solution: Set "b_marks_read" in the new buffer. (Christian Brabandt, closes #7350)
Diffstat (limited to 'src/bufwrite.c')
-rw-r--r--src/bufwrite.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bufwrite.c b/src/bufwrite.c
index 4b522465d5..d9f85a3a38 100644
--- a/src/bufwrite.c
+++ b/src/bufwrite.c
@@ -2579,6 +2579,12 @@ nofail:
#endif
}
+#ifdef FEAT_VIMINFO
+ // Make sure marks will be written out to the viminfo file later, even when
+ // the file is new.
+ curbuf->b_marks_read = TRUE;
+#endif
+
got_int |= prev_got_int;
return retval;