diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-12 10:40:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-12 10:40:27 +0800 |
commit | 1c4b3d41b538078234282cfba74e5cf07c42c916 (patch) | |
tree | d0220d4f5d4218c02c059f3d8402db7410d78c6b /src/nvim/ex_docmd.c | |
parent | 714f6bf249fc6a9e6e389fafebdab3719bc06e71 (diff) | |
download | rneovim-1c4b3d41b538078234282cfba74e5cf07c42c916.tar.gz rneovim-1c4b3d41b538078234282cfba74e5cf07c42c916.tar.bz2 rneovim-1c4b3d41b538078234282cfba74e5cf07c42c916.zip |
fix(sleep): correct cursor placement (#22639)
Just setcursor_mayforce(true) is enough as Nvim uses msg_grid.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index f460b4b93f..49f6d24c89 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -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; |