neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 83f38800e7f99ed1ed352b71ab86471ee5e8f54e
parent 36fc266e86897ad4dd60dabdbfde786f8861e138
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date:   Sat,  9 Aug 2025 23:27:13 -0400

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:
Msrc/nvim/memline.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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;