mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
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:
@@ -6511,6 +6511,10 @@ pos_T *var2fpos(const typval_T *const tv, const bool dollar_lnum, int *const ret
|
||||
pos.coladd = 0;
|
||||
|
||||
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
|
||||
update_topline(curwin);
|
||||
|
Reference in New Issue
Block a user