mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
feat(extmarks): add sign name to extmark "details" array
Problem: Unable to identify legacy signs when fetching extmarks with
`nvim_buf_get_extmarks()`.
Solution: Add "sign_name" to the extmark detail array.
Add some misc. changes as follow-up to #25724
This commit is contained in:
@@ -1582,6 +1582,23 @@ describe('API/extmarks', function()
|
||||
priority = 4096,
|
||||
right_gravity = true,
|
||||
} }, get_extmark_by_id(ns, marks[3], { details = true }))
|
||||
curbufmeths.clear_namespace(ns, 0, -1)
|
||||
-- legacy sign mark includes sign name
|
||||
command('sign define sign1 text=s1 texthl=Title linehl=LineNR numhl=Normal culhl=CursorLine')
|
||||
command('sign place 1 name=sign1 line=1')
|
||||
eq({ {1, 0, 0, {
|
||||
cursorline_hl_group = 'CursorLine',
|
||||
invalidate = true,
|
||||
line_hl_group = 'LineNr',
|
||||
ns_id = 0,
|
||||
number_hl_group = 'Normal',
|
||||
priority = 10,
|
||||
right_gravity = true,
|
||||
sign_hl_group = 'Title',
|
||||
sign_name = 'sign1',
|
||||
sign_text = 's1',
|
||||
undo_restore = false
|
||||
} } }, get_extmarks(-1, 0, -1, { details = true }))
|
||||
end)
|
||||
|
||||
it('can get marks from anonymous namespaces', function()
|
||||
|
||||
Reference in New Issue
Block a user