patch 8.1.2303: cursor in wrong position after horizontal scroll
Problem: Cursor in wrong position after horizontal scroll.
Solution: Set w_valid_leftcol. (closes #5214, closes #5224)
diff --git a/src/move.c b/src/move.c
index d340f02..b010ef9 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1175,6 +1175,9 @@
redraw_later(SOME_VALID);
#endif
+ // now w_leftcol is valid, avoid check_cursor_moved() thinking otherwise
+ curwin->w_valid_leftcol = curwin->w_leftcol;
+
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
}