fix(column): avoid exceeding configured 'signcolumn' width

This commit is contained in:
Luuk van Baal
2023-12-21 01:23:06 +01:00
committed by Lewis Russell
parent 720a3518e3
commit 2ded2e75f4
2 changed files with 124 additions and 98 deletions

View File

@@ -1211,7 +1211,7 @@ static bool win_redraw_signcols(win_T *wp)
} else if (wp->w_maxscwidth <= 1 && buf->b_signs_with_text >= (size_t)wp->w_maxscwidth) {
width = wp->w_maxscwidth;
} else {
width = buf_signcols_validate(wp, buf, false);
width = MIN(wp->w_maxscwidth, buf_signcols_validate(wp, buf, false));
}
int scwidth = wp->w_scwidth;