mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
fix(api/buffer): fix handling of viewport of non-current buffer
A lot of functions in move.c only worked for curwin, alternatively took a `wp` arg but still only work if that happens to be curwin. Refactor those that are needed for update_topline(wp) to work for any window. fixes #27723 fixes #27720
This commit is contained in:
@@ -1478,11 +1478,11 @@ void execute_menu(const exarg_T *eap, vimmenu_T *menu, int mode_idx)
|
||||
// Activate visual mode
|
||||
VIsual_active = true;
|
||||
VIsual_reselect = true;
|
||||
check_cursor();
|
||||
check_cursor(curwin);
|
||||
VIsual = curwin->w_cursor;
|
||||
curwin->w_cursor = tpos;
|
||||
|
||||
check_cursor();
|
||||
check_cursor(curwin);
|
||||
|
||||
// Adjust the cursor to make sure it is in the correct pos
|
||||
// for exclusive mode
|
||||
|
Reference in New Issue
Block a user