From 8509014adda188ee8bdf6a2e123fbf15a91b29d2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 1 Jun 2023 19:27:08 +0100 Subject: patch 9.0.1597: cursor ends up below the window after a put Problem: Cursor ends up below the window after a put. Solution: Mark w_crow and w_botline invalid when changing the cursor line. (closes #12465) --- src/eval.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index b8d954d6a2..89141bfe3e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6322,6 +6322,10 @@ var2fpos( if (name[0] == 'w' && dollar_lnum) { + // the "w_valid" flags are not reset when moving the cursor, but they + // do matter for update_topline() and validate_botline(). + check_cursor_moved(curwin); + pos.col = 0; if (name[1] == '0') // "w0": first visible line { -- cgit v1.2.3