summaryrefslogtreecommitdiffstats
path: root/src/normal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/normal.c b/src/normal.c
index c319be599a..3d9f74dec5 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3729,7 +3729,8 @@ nv_scroll(cmdarg_T *cap)
{
(void)hasFolding(curwin->w_cursor.lnum,
&curwin->w_cursor.lnum, NULL);
- --curwin->w_cursor.lnum;
+ if (curwin->w_cursor.lnum > curwin->w_topline)
+ --curwin->w_cursor.lnum;
}
}
else