summaryrefslogtreecommitdiffstats
path: root/src/move.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-16 14:19:33 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-16 14:19:33 +0100
commit08f23636aef595f4cc061dfee8248dca97df16b3 (patch)
tree90da2416a35ce2c406cca94115f8578e358804c2 /src/move.c
parentf4a1d1c0542df151bc59ac3b798ed198b5c71ccc (diff)
patch 8.1.2303: cursor in wrong position after horizontal scrollv8.1.2303
Problem: Cursor in wrong position after horizontal scroll. Solution: Set w_valid_leftcol. (closes #5214, closes #5224)
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c
index d340f0223c..b010ef9369 100644
--- 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;
}