neovim

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

commit b480b0cd5d128ad8f483b26780b11dee66c73766
parent ff8edbaa6ce826af0d165a95832fc3d3347bbbe9
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date:   Tue, 30 Dec 2025 23:35:32 -0500

vim-patch:8.2.3159: cursor displayed in wrong position after deleting line

Problem:    Cursor displayed in wrong position after deleting line.
Solution:   When deleting lines do not approximate botline. (fixes vim/vim#8559)

https://github.com/vim/vim/commit/5bea41dea34bcc73c4efb1b554ad0a2018966ecc

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

Diffstat:
Msrc/nvim/change.c | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/nvim/change.c b/src/nvim/change.c @@ -177,9 +177,13 @@ static void changed_lines_invalidate_win(win_T *wp, linenr_T lnum, colnr_T col, changed_cline_bef_curs(wp); } if (wp->w_botline >= lnum) { - // Assume that botline doesn't change (inserted lines make - // other lines scroll down below botline). - approximate_botline_win(wp); + if (xtra < 0) { + invalidate_botline_win(wp); + } else { + // Assume that botline doesn't change (inserted lines make + // other lines scroll down below botline). + approximate_botline_win(wp); + } } // If lines have been inserted/deleted and the buffer has virt_lines, or