mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 19:45:02 +00:00
fix(api): get virtual text with multiple hl properly (#25307)
This commit is contained in:
@@ -1524,16 +1524,19 @@ describe('API/extmarks', function()
|
||||
sign_hl_group = "Statement",
|
||||
sign_text = ">>",
|
||||
spell = true,
|
||||
virt_lines = { { { "lines", "Statement" } }},
|
||||
virt_lines = {
|
||||
{ { "lines", "Macro" }, { "???" } },
|
||||
{ { "stack", { "Type", "Search" } }, { "!!!" } },
|
||||
},
|
||||
virt_lines_above = true,
|
||||
virt_lines_leftcol = true,
|
||||
virt_text = { { "text", "Statement" } },
|
||||
virt_text = { { "text", "Macro" }, { "???" }, { "stack", { "Type", "Search" } } },
|
||||
virt_text_hide = true,
|
||||
virt_text_pos = "right_align",
|
||||
})
|
||||
set_extmark(ns, marks[2], 0, 0, {
|
||||
priority = 0,
|
||||
virt_text = { { "text", "Statement" } },
|
||||
virt_text = { { "", "Macro" }, { "", { "Type", "Search" } }, { "" } },
|
||||
virt_text_win_col = 1,
|
||||
})
|
||||
eq({0, 0, {
|
||||
@@ -1553,10 +1556,13 @@ describe('API/extmarks', function()
|
||||
sign_hl_group = "Statement",
|
||||
sign_text = ">>",
|
||||
spell = true,
|
||||
virt_lines = { { { "lines", "Statement" } }},
|
||||
virt_lines = {
|
||||
{ { "lines", "Macro" }, { "???" } },
|
||||
{ { "stack", { "Type", "Search" } }, { "!!!" } },
|
||||
},
|
||||
virt_lines_above = true,
|
||||
virt_lines_leftcol = true,
|
||||
virt_text = { { "text", "Statement" } },
|
||||
virt_text = { { "text", "Macro" }, { "???" }, { "stack", { "Type", "Search" } } },
|
||||
virt_text_hide = true,
|
||||
virt_text_pos = "right_align",
|
||||
} }, get_extmark_by_id(ns, marks[1], { details = true }))
|
||||
@@ -1564,7 +1570,7 @@ describe('API/extmarks', function()
|
||||
ns_id = 1,
|
||||
right_gravity = true,
|
||||
priority = 0,
|
||||
virt_text = { { "text", "Statement" } },
|
||||
virt_text = { { "", "Macro" }, { "", { "Type", "Search" } }, { "" } },
|
||||
virt_text_hide = false,
|
||||
virt_text_pos = "win_col",
|
||||
virt_text_win_col = 1,
|
||||
|
||||
Reference in New Issue
Block a user