diff options
author | luukvbaal <31730729+luukvbaal@users.noreply.github.com> | 2023-03-18 12:44:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-18 11:44:44 +0000 |
commit | 204a8b17c8ebab1619cc47a920a06dcc348d75f7 (patch) | |
tree | ea7b0a6f6fce8513b3eea7826772af3f1c08845d /src/nvim/buffer.c | |
parent | 8916669d50243f6d4cdfb9480ef1b4e7ccdcfbb6 (diff) | |
download | rneovim-204a8b17c8ebab1619cc47a920a06dcc348d75f7.tar.gz rneovim-204a8b17c8ebab1619cc47a920a06dcc348d75f7.tar.bz2 rneovim-204a8b17c8ebab1619cc47a920a06dcc348d75f7.zip |
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
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index cedbadbaf3..9a757960af 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -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; } |