aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 6237b11de2..ce4ca92ae8 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -2796,7 +2796,8 @@ static const char *check_num_option_bounds(OptInt *pp, OptInt old_value, char *e
}
}
- if ((curwin->w_p_scr <= 0 || (curwin->w_p_scr > curwin->w_height && curwin->w_height > 0))
+ if ((curwin->w_p_scr <= 0
+ || (curwin->w_p_scr > curwin->w_height_inner && curwin->w_height_inner > 0))
&& full_screen) {
if (pp == &(curwin->w_p_scr)) {
if (curwin->w_p_scr != 0) {
@@ -2806,8 +2807,8 @@ static const char *check_num_option_bounds(OptInt *pp, OptInt old_value, char *e
} else if (curwin->w_p_scr <= 0) {
// If 'scroll' became invalid because of a side effect silently adjust it.
curwin->w_p_scr = 1;
- } else { // curwin->w_p_scr > curwin->w_height
- curwin->w_p_scr = curwin->w_height;
+ } else { // curwin->w_p_scr > curwin->w_height_inner
+ curwin->w_p_scr = curwin->w_height_inner;
}
}
if ((p_sj < -100 || p_sj >= Rows) && full_screen) {