vim-patch:9.0.1597: cursor ends up below the window after a put (#23873)

Problem:    Cursor ends up below the window after a put.
Solution:   Mark w_crow and w_botline invalid when changing the cursor line.
            (closes vim/vim#12465)

8509014add

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-06-02 08:48:49 +08:00
committed by GitHub
parent a0375b68c1
commit 9f3c4c1526
5 changed files with 55 additions and 5 deletions

View File

@@ -3484,6 +3484,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
if (lnum == curwin->w_cursor.lnum) {
// make sure curwin->w_virtcol is updated
changed_cline_bef_curs();
invalidate_botline();
curwin->w_cursor.col += (colnr_T)(totlen - 1);
}
changed_bytes(lnum, col);