mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +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:
@@ -2479,9 +2479,8 @@ const char *did_set_virtualedit(optset_T *args)
|
||||
} else if (strcmp(ve, args->os_oldval.string.data) != 0) {
|
||||
// Recompute cursor position in case the new 've' setting
|
||||
// changes something.
|
||||
validate_virtcol_win(win);
|
||||
// XXX: this only works when win == curwin
|
||||
coladvance(win->w_virtcol);
|
||||
validate_virtcol(win);
|
||||
coladvance(win, win->w_virtcol);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user