summaryrefslogtreecommitdiffstats
path: root/src/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/move.c b/src/move.c
index aa90b528aa..d90e4d2d96 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1125,10 +1125,10 @@ curs_columns(
n = curwin->w_wrow + so;
else
n = p_lines;
- if ((colnr_T)n >= curwin->w_height + curwin->w_skipcol / width)
+ if ((colnr_T)n >= curwin->w_height + curwin->w_skipcol / width - so)
extra += 2;
- if (extra == 3 || p_lines < so * 2)
+ if (extra == 3 || p_lines <= so * 2)
{
// not enough room for 'scrolloff', put cursor in the middle
n = curwin->w_virtcol / width;