aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-11-18 23:49:11 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2023-11-22 12:43:59 +0100
commitc249058758af6919f718750b2f4acb96bafeb2dd (patch)
tree64002d073da4466869aea09e06b2d18734663d90 /test/functional/api/extmark_spec.lua
parent34fa1e1ca4ddee0429f098a3ac885a716138fb6c (diff)
downloadrneovim-c249058758af6919f718750b2f4acb96bafeb2dd.tar.gz
rneovim-c249058758af6919f718750b2f4acb96bafeb2dd.tar.bz2
rneovim-c249058758af6919f718750b2f4acb96bafeb2dd.zip
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
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r--test/functional/api/extmark_spec.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index 2115c7c244..44a151cf6a 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -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()