summaryrefslogtreecommitdiffstats
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-13 20:14:45 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-13 20:14:45 +0200
commit0fb286e82d28730fcb3293894dd4df2e069eaf9a (patch)
treea8110a1004c03a2a2a20ce52d1da86d271a815d6 /src/memline.c
parent63d0dad874e6f949c18dd2b3c8c14d59cad58062 (diff)
patch 8.1.1681: insert stray "{" when listener gets buffer linev8.1.1681
Problem: Insert stray "{" when listener gets buffer line. (Paul Jolly) Solution: Flush the cached line after invoking listeners. (closes #4455)
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c
index 0e3bdb8b6b..b9de06e1df 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2836,8 +2836,10 @@ ml_append_int(
#ifdef FEAT_EVAL
// When inserting above recorded changes: flush the changes before changing
- // the text.
+ // the text. Then flush the cached line, it may become invalid.
may_invoke_listeners(buf, lnum + 1, lnum + 1, 1);
+ if (curbuf->b_ml.ml_line_lnum != 0)
+ ml_flush_line(curbuf);
#endif
#ifdef FEAT_TEXT_PROP