summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-13 23:16:36 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-13 23:16:36 +0100
commitca79a5fc3b383dcfc8ed2077688ea69dafadc6e7 (patch)
tree661c4f8f001c6d53ebd2648dc54de4d978aea713 /src/memline.c
parent2fa7fad831a860b627b5d6980aae0eeebfda0b3b (diff)
downloadvim-git-ca79a5fc3b383dcfc8ed2077688ea69dafadc6e7.tar.gz
patch 8.1.0581: double free without the text properties featurev8.1.0581
Problem: Double free without the text properties feature. Solution: Reset the dirty flag.
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c
index 59e450260..0eb31c3c5 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3176,9 +3176,9 @@ ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int copy)
{
// another line is buffered, flush it
ml_flush_line(curbuf);
+ curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
#ifdef FEAT_TEXT_PROP
- curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
if (has_any_text_properties(curbuf))
// Need to fetch the old line to copy over any text properties.
ml_get_buf(curbuf, lnum, TRUE);