aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/drawline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index c85b9d2288..3b88dd2e90 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -189,7 +189,7 @@ static void margin_columns_win(win_T *wp, int *left_col, int *right_col)
*left_col = 0;
*right_col = width1;
- if (wp->w_virtcol >= (colnr_T)width1) {
+ if (wp->w_virtcol >= (colnr_T)width1 && width2 > 0) {
*right_col = width1 + ((wp->w_virtcol - width1) / width2 + 1) * width2;
}
if (wp->w_virtcol >= (colnr_T)width1 && width2 > 0) {