mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +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:
@@ -1116,7 +1116,7 @@ void ex_retab(exarg_T *eap)
|
||||
}
|
||||
xfree(new_ts_str);
|
||||
}
|
||||
coladvance(curwin->w_curswant);
|
||||
coladvance(curwin, curwin->w_curswant);
|
||||
|
||||
u_clearline(curbuf);
|
||||
}
|
||||
@@ -1160,7 +1160,7 @@ int get_expr_indent(void)
|
||||
curwin->w_cursor = save_pos;
|
||||
curwin->w_curswant = save_curswant;
|
||||
curwin->w_set_curswant = save_set_curswant;
|
||||
check_cursor();
|
||||
check_cursor(curwin);
|
||||
State = save_State;
|
||||
|
||||
// Reset did_throw, unless 'debug' has "throw" and inside a try/catch.
|
||||
|
Reference in New Issue
Block a user