aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/move.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 7cc65c83ce..e635b381d3 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -1475,6 +1475,9 @@ void adjust_skipcol(void)
}
int width1 = curwin->w_width - curwin_col_off();
+ if (width1 <= 0) {
+ return; // no text will be displayed
+ }
int width2 = width1 + curwin_col_off2();
long so = get_scrolloff_value(curwin);
long scrolloff_cols = so == 0 ? 0 : width1 + (so - 1) * width2;