mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
fix(column): unnecessary redraws with resized 'statuscolumn' (#32944)
Problem: Since 3cb1e825
, all windows with 'statuscolumn' set, and a
resized 'signcolumn' for a particular buffer are marked
to be fully redrawn when the first window is encountered.
The "resized" variable is only unset after all windows have
been drawn, so this results in windows that have just been
draw to be marked for redraw again, even though the
signcolumn did not change size again.
Solution: Replace the `resized` variable with a `last_max` variable that
is changed when the first window into buf is encountered.
This commit is contained in:
@@ -245,8 +245,8 @@ void buf_remove_decor_sh(buf_T *buf, int row1, int row2, DecorSignHighlight *sh)
|
||||
buf_signcols_count_range(buf, row1, row2, -1, kFalse);
|
||||
} else {
|
||||
may_force_numberwidth_recompute(buf, true);
|
||||
buf->b_signcols.resized = true;
|
||||
buf->b_signcols.max = buf->b_signcols.count[0] = 0;
|
||||
buf->b_signcols.count[0] = 0;
|
||||
buf->b_signcols.max = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1069,7 +1069,6 @@ void buf_signcols_count_range(buf_T *buf, int row1, int row2, int add, TriState
|
||||
if (clear != kTrue && width > 0) {
|
||||
buf->b_signcols.count[width - 1]++;
|
||||
if (width > buf->b_signcols.max) {
|
||||
buf->b_signcols.resized = true;
|
||||
buf->b_signcols.max = width;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user