changeset 25246:5932642234e1 v8.2.3159

patch 8.2.3159: cursor displayed in wrong position after deleting line Commit: https://github.com/vim/vim/commit/5bea41dea34bcc73c4efb1b554ad0a2018966ecc Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 13 22:21:44 2021 +0200 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 https://github.com/vim/vim/issues/8559)
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Jul 2021 22:30:05 +0200
parents 202f48dbc48a
children df8387c6b8dd
files src/change.c src/version.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/change.c
+++ b/src/change.c
@@ -563,9 +563,12 @@ changed_common(
 		changed_cline_bef_curs_win(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);
 	    }
 
 	    // Check if any w_lines[] entries have become invalid.
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3159,
+/**/
     3158,
 /**/
     3157,