0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54:16 -04:00

patch 8.1.1681: insert stray "{" when listener gets buffer line

Problem:    Insert stray "{" when listener gets buffer line. (Paul Jolly)
Solution:   Flush the cached line after invoking listeners. (closes #4455)
This commit is contained in:
Bram Moolenaar
2019-07-13 20:14:45 +02:00
parent 63d0dad874
commit 0fb286e82d
3 changed files with 31 additions and 1 deletions

View File

@@ -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