mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +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>
This commit is contained in:
@@ -2040,6 +2040,9 @@ static int ml_append_int(buf_T *buf, linenr_T lnum, char *line, colnr_T len, boo
|
||||
if (len == 0) {
|
||||
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
|
||||
|
||||
memfile_T *mfp = buf->b_ml.ml_mfp;
|
||||
|
Reference in New Issue
Block a user