patch 8.2.4915: sometimes the cursor is in the wrong position
Problem: Sometimes the cursor is in the wrong position.
Solution: When the cursor moved to another line, recompute w_botline.
(closes #9736)
diff --git a/src/move.c b/src/move.c
index 31dc95b..5e31e71 100644
--- a/src/move.c
+++ b/src/move.c
@@ -489,7 +489,8 @@
if (wp->w_cursor.lnum != wp->w_valid_cursor.lnum)
{
wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
- |VALID_CHEIGHT|VALID_CROW|VALID_TOPLINE);
+ |VALID_CHEIGHT|VALID_CROW|VALID_TOPLINE
+ |VALID_BOTLINE|VALID_BOTLINE_AP);
wp->w_valid_cursor = wp->w_cursor;
wp->w_valid_leftcol = wp->w_leftcol;
}