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:
luukvbaal
2025-03-17 21:52:45 +01:00
committed by GitHub
parent 5440e59247
commit 063b69bab4
3 changed files with 7 additions and 10 deletions

View File

@@ -702,8 +702,8 @@ struct file_buffer {
struct {
int max; // maximum number of signs on a single line
int last_max; // value of max when the buffer was last drawn
int count[SIGN_SHOW_MAX]; // number of lines with number of signs
bool resized; // whether max changed at start of redraw
bool autom; // whether 'signcolumn' is displayed in "auto:n>1"
// configured window. "b_signcols" calculation
// is skipped if false.