mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46: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:
@@ -135,9 +135,9 @@ void state_handle_k_event(void)
|
||||
}
|
||||
|
||||
/// Return true if in the current mode we need to use virtual.
|
||||
bool virtual_active(void)
|
||||
bool virtual_active(win_T *wp)
|
||||
{
|
||||
unsigned cur_ve_flags = get_ve_flags();
|
||||
unsigned cur_ve_flags = get_ve_flags(wp);
|
||||
|
||||
// While an operator is being executed we return "virtual_op", because
|
||||
// VIsual_active has already been reset, thus we can't check for "block"
|
||||
|
Reference in New Issue
Block a user