aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c5
-rw-r--r--src/nvim/move.c3
2 files changed, 2 insertions, 6 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;
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 8fda73cbec..6d55955927 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -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.