From 08f23636aef595f4cc061dfee8248dca97df16b3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 16 Nov 2019 14:19:33 +0100 Subject: 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) --- src/move.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/move.c') 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; } -- cgit v1.2.3