mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
fix(sleep): correct cursor placement (#22639)
Just setcursor_mayforce(true) is enough as Nvim uses msg_grid.
This commit is contained in:
@@ -5666,10 +5666,7 @@ static void ex_equal(exarg_T *eap)
|
||||
static void ex_sleep(exarg_T *eap)
|
||||
{
|
||||
if (cursor_valid()) {
|
||||
int n = curwin->w_winrow + curwin->w_wrow - msg_scrolled;
|
||||
if (n >= 0) {
|
||||
ui_cursor_goto(n, curwin->w_wincol + curwin->w_wcol);
|
||||
}
|
||||
setcursor_mayforce(true);
|
||||
}
|
||||
|
||||
long len = eap->line2;
|
||||
|
@@ -512,8 +512,7 @@ void approximate_botline_win(win_T *wp)
|
||||
int cursor_valid(void)
|
||||
{
|
||||
check_cursor_moved(curwin);
|
||||
return (curwin->w_valid & (VALID_WROW|VALID_WCOL)) ==
|
||||
(VALID_WROW|VALID_WCOL);
|
||||
return (curwin->w_valid & (VALID_WROW|VALID_WCOL)) == (VALID_WROW|VALID_WCOL);
|
||||
}
|
||||
|
||||
// Validate cursor position. Makes sure w_wrow and w_wcol are valid.
|
||||
|
Reference in New Issue
Block a user