mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
fix(column): rebuild status column when sign column is invalidated (#22690)
* fix(column): rebuild status column when sign column is invalidated
Problem: When implementing a custom sign column through
`'statuscolumn'`, the status column is not properly rebuilt
when the sign column width changes.
Solution: Force a rebuild of the status column when the sign column
width is invalidated.
* test(column): 'statuscolumn' has correct width when (un)placing signs
This commit is contained in:
@@ -4109,6 +4109,7 @@ void buf_signcols_del_check(buf_T *buf, linenr_T line1, linenr_T line2)
|
||||
|
||||
if (!buf->b_signcols.sentinel) {
|
||||
buf->b_signcols.valid = false;
|
||||
invalidate_statuscol(NULL, buf);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4117,6 +4118,7 @@ void buf_signcols_del_check(buf_T *buf, linenr_T line1, linenr_T line2)
|
||||
if (sent >= line1 && sent <= line2) {
|
||||
// Only invalidate when removing signs at the sentinel line.
|
||||
buf->b_signcols.valid = false;
|
||||
invalidate_statuscol(NULL, buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4132,6 +4134,7 @@ void buf_signcols_add_check(buf_T *buf, sign_entry_T *added)
|
||||
|
||||
if (!added || !buf->b_signcols.sentinel) {
|
||||
buf->b_signcols.valid = false;
|
||||
invalidate_statuscol(NULL, buf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user