aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2025-08-09 23:27:13 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2025-08-10 22:22:44 -0400
commit83f38800e7f99ed1ed352b71ab86471ee5e8f54e (patch)
tree6951b1446b28bf2ba20a11c48554524341004ae0 /src
parent36fc266e86897ad4dd60dabdbfde786f8861e138 (diff)
downloadrneovim-83f38800e7f99ed1ed352b71ab86471ee5e8f54e.tar.gz
rneovim-83f38800e7f99ed1ed352b71ab86471ee5e8f54e.tar.bz2
rneovim-83f38800e7f99ed1ed352b71ab86471ee5e8f54e.zip
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) https://github.com/vim/vim/commit/0fb286e82d28730fcb3293894dd4df2e069eaf9a Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/memline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index a9af5e6210..4b2f9076c3 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -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;