mirror of
https://github.com/neovim/neovim.git
synced 2025-12-14 10:25:42 +00:00
vim-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 vim/vim#4455)
0fb286e82d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 83f38800e7)
This commit is contained in:
committed by
github-actions[bot]
parent
c2a3838ab2
commit
a0dac399d0
@@ -2039,6 +2039,9 @@ static int ml_append_int(buf_T *buf, linenr_T lnum, char *line, colnr_T len, boo
|
|||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
len = (colnr_T)strlen(line) + 1; // space needed for the text
|
len = (colnr_T)strlen(line) + 1; // space needed for the text
|
||||||
}
|
}
|
||||||
|
if (curbuf->b_ml.ml_line_lnum != 0) {
|
||||||
|
ml_flush_line(curbuf, false);
|
||||||
|
}
|
||||||
int space_needed = len + (int)INDEX_SIZE; // space needed for text + index
|
int space_needed = len + (int)INDEX_SIZE; // space needed for text + index
|
||||||
|
|
||||||
memfile_T *mfp = buf->b_ml.ml_mfp;
|
memfile_T *mfp = buf->b_ml.ml_mfp;
|
||||||
|
|||||||
Reference in New Issue
Block a user