refactor(signs): more efficient signcol calc

When iterating signs to calculate the sign column, stop iterating when
we reach the maximum configured from 'signcolumn'.
This commit is contained in:
Lewis Russell
2022-02-12 17:12:09 +00:00
parent 7db0aa027c
commit 50250542c3
3 changed files with 40 additions and 26 deletions

View File

@@ -794,7 +794,7 @@ static void win_update(win_T *wp, Providers *providers)
// If we can compute a change in the automatic sizing of the sign column
// under 'signcolumn=auto:X' and signs currently placed in the buffer, better
// figuring it out here so we can redraw the entire screen for it.
buf_signcols(buf);
win_signcol_count(wp);
type = wp->w_redr_type;