mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 01:09:56 +10: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.
This commit is contained in:
@@ -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