mirror of
https://github.com/neovim/neovim.git
synced 2025-11-26 20:20:42 +00:00
fix(column): crash with 'signcolumn' set to "number" (#29003)
Problem: Numberwidth may depend on number of signs with text in the
buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
handled properly for legacy and extmark signs alike.
(cherry picked from commit f2083bd55c)
This commit is contained in:
committed by
github-actions[bot]
parent
58e1ef2f65
commit
df6ce8377f
@@ -5497,6 +5497,26 @@ l5
|
||||
|
||||
api.nvim_buf_clear_namespace(0, ns, 0, -1)
|
||||
end)
|
||||
|
||||
it([[correct numberwidth with 'signcolumn' set to "number" #28984]], function()
|
||||
command('set number numberwidth=1 signcolumn=number')
|
||||
api.nvim_buf_set_extmark(0, ns, 0, 0, { sign_text = 'S1' })
|
||||
screen:expect({
|
||||
grid = [[
|
||||
S1 ^ |
|
||||
{1:~ }|*8
|
||||
|
|
||||
]]
|
||||
})
|
||||
api.nvim_buf_del_extmark(0, ns, 1)
|
||||
screen:expect({
|
||||
grid = [[
|
||||
{8:1 }^ |
|
||||
{1:~ }|*8
|
||||
|
|
||||
]]
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('decorations: virt_text', function()
|
||||
|
||||
Reference in New Issue
Block a user