feat(extmarks): extend nvim_buf_get_extmarks()

Problem:    Can not get all extmarks in a buffer. Properties are missing
            from the details array.
Solution:   Allow getting all extmarks in a buffer by supplying a -1
            "ns_id". Add missing properties to the details array.
This commit is contained in:
Luuk van Baal
2023-03-25 02:24:24 +01:00
parent 2257ade3dc
commit 2a10f64e25
7 changed files with 200 additions and 48 deletions

View File

@@ -766,6 +766,7 @@ describe('Buffer highlighting', function()
-- an existing virtual text. We might add a prioritation system.
set_virtual_text(id1, 0, s1, {})
eq({{1, 0, 0, {
ns_id = 1,
priority = 0,
virt_text = s1,
-- other details
@@ -778,6 +779,7 @@ describe('Buffer highlighting', function()
local lastline = line_count()
set_virtual_text(id1, line_count(), s2, {})
eq({{3, lastline, 0, {
ns_id = 1,
priority = 0,
virt_text = s2,
-- other details