diff src/move.c @ 18621:a9bfdc5ea1ec v8.1.2303

patch 8.1.2303: cursor in wrong position after horizontal scroll Commit: https://github.com/vim/vim/commit/08f23636aef595f4cc061dfee8248dca97df16b3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 16 14:19:33 2019 +0100 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 https://github.com/vim/vim/issues/5214, closes https://github.com/vim/vim/issues/5224)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Nov 2019 14:30:03 +0100
parents 4ac042c8ed98
children 49b78d6465e5
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -1175,6 +1175,9 @@ curs_columns(
 	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;
 }