fix(sleep): correct cursor placement (#22639)

Just setcursor_mayforce(true) is enough as Nvim uses msg_grid.
This commit is contained in:
zeertzjq
2023-03-12 10:40:27 +08:00
committed by GitHub
parent 714f6bf249
commit 1c4b3d41b5
3 changed files with 275 additions and 7 deletions

View File

@@ -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;