neovim

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

commit 09964b7ef0e348b68eab5e12d0244025b76d3013
parent 15d3a83999db590362168d0a1c4c67dbc1f949f6
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date:   Mon, 18 Aug 2025 01:06:14 -0400

vim-patch:8.2.4379: an empty change is reported to a listener

Problem:    An empty change is reported to a listener.
Solution:   Do not report an empty change. (closes vim/vim#9768)  Remove unused
            return value.

https://github.com/vim/vim/commit/55737c2a31ed450dd7bf2a9c587adfbb32b755bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Msrc/nvim/undo.c | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/nvim/undo.c b/src/nvim/undo.c @@ -2378,12 +2378,14 @@ static void u_undoredo(bool undo, bool do_buf_event) } } - changed_lines(curbuf, top + 1, 0, bot, newsize - oldsize, do_buf_event); - // When text has been changed, possibly the start of the next line - // may have SpellCap that should be removed or it needs to be - // displayed. Schedule the next line for redrawing just in case. - if (spell_check_window(curwin) && bot <= curbuf->b_ml.ml_line_count) { - redrawWinline(curwin, bot); + if (oldsize > 0 || newsize > 0) { + changed_lines(curbuf, top + 1, 0, bot, newsize - oldsize, do_buf_event); + // When text has been changed, possibly the start of the next line + // may have SpellCap that should be removed or it needs to be + // displayed. Schedule the next line for redrawing just in case. + if (spell_check_window(curwin) && bot <= curbuf->b_ml.ml_line_count) { + redrawWinline(curwin, bot); + } } // Set the '[ mark.