]> granicus.if.org Git - vim/commitdiff
patch 8.2.3159: cursor displayed in wrong position after deleting line v8.2.3159
authorBram Moolenaar <Bram@vim.org>
Tue, 13 Jul 2021 20:21:44 +0000 (22:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 13 Jul 2021 20:21:44 +0000 (22:21 +0200)
Problem:    Cursor displayed in wrong position after deleting line.
Solution:   When deleting lines do not approximate botline. (fixes #8559)

src/change.c
src/version.c

index 248e6d84874b937ed6af5742db4abef026416af9..73ea64ff197e70fb55eb57cb7d0997e2c9c35372 100644 (file)
@@ -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.
index 3de30484477279a2b4754d381026be2362deedd8..86a6380727c81159c2ae9940de830d270ef15105 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3159,
 /**/
     3158,
 /**/