fix(statuscolumn): force full redraw when signcolumn is invalid

Fix #24655

(cherry picked from commit 36108bfa11)
This commit is contained in:
Luuk van Baal
2023-08-24 12:16:29 +02:00
committed by github-actions[bot]
parent bb847a8b55
commit 13c368eca5
2 changed files with 4 additions and 0 deletions

View File

@@ -596,6 +596,8 @@ int update_screen(void)
// Reset 'statuscolumn' if there is no dedicated signcolumn but it is invalid.
if (*wp->w_p_stc != NUL && !wp->w_buffer->b_signcols.valid && win_no_signcol(wp)) {
wp->w_nrwidth_line_count = 0;
wp->w_valid &= ~VALID_WCOL;
wp->w_redr_type = UPD_NOT_VALID;
}
}

View File

@@ -725,6 +725,8 @@ describe('statuscolumn', function()
end
return vim.v.lnum .. '%=' .. sign
end
vim.o.number = true
vim.o.numberwidth = 2
vim.o.statuscolumn = "%!v:lua.StatusCol()"
]])
command('sign place 1 line=2 name=sign')