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:
bfredl
2024-03-11 13:19:49 +01:00
parent d5488633f6
commit 08fc1ebbaa
50 changed files with 844 additions and 814 deletions

View File

@@ -1246,7 +1246,7 @@ Boolean nvim_win_add_ns(Window window, Integer ns_id, Error *err)
set_put(uint32_t, &win->w_ns_set, (uint32_t)ns_id);
changed_window_setting_win(win);
changed_window_setting(win);
return true;
}
@@ -1291,7 +1291,7 @@ Boolean nvim_win_remove_ns(Window window, Integer ns_id, Error *err)
set_del(uint32_t, &win->w_ns_set, (uint32_t)ns_id);
changed_window_setting_win(win);
changed_window_setting(win);
return true;
}