aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-01-21 18:02:47 +0100
committerGitHub <noreply@github.com>2022-01-21 18:02:47 +0100
commitbe22cc1264ba27ed46f8ef3123c532d721478607 (patch)
tree6372faa55ce4e5bbb85f8048f2b21014275fa1ff /test/functional/api/extmark_spec.lua
parent9d02fc4c00f61724610224f91950c51bd2700c97 (diff)
parent5971b863383160d9bf744a9789c1fe5ca62b55a4 (diff)
downloadrneovim-be22cc1264ba27ed46f8ef3123c532d721478607.tar.gz
rneovim-be22cc1264ba27ed46f8ef3123c532d721478607.tar.bz2
rneovim-be22cc1264ba27ed46f8ef3123c532d721478607.zip
Merge pull request #17076 from notomo/expose-extmark-more-details
feat(api): expose extmark more details
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r--test/functional/api/extmark_spec.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index c027cfb5eb..3f79515949 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -1448,6 +1448,49 @@ describe('API/extmarks', function()
})
eq({ {1, 0, 0, { end_col = 0, end_row = 1 }} }, get_extmarks(ns, 0, -1, {details=true}))
end)
+
+ it('can get details', function()
+ set_extmark(ns, marks[1], 0, 0, {
+ end_col = 0,
+ end_row = 1,
+ priority = 0,
+ hl_eol = true,
+ hl_mode = "blend",
+ hl_group = "String",
+ virt_text = { { "text", "Statement" } },
+ virt_text_pos = "right_align",
+ virt_text_hide = true,
+ virt_lines = { { { "lines", "Statement" } }},
+ virt_lines_above = true,
+ virt_lines_leftcol = true,
+ })
+ set_extmark(ns, marks[2], 0, 0, {
+ priority = 0,
+ virt_text = { { "text", "Statement" } },
+ virt_text_win_col = 1,
+ })
+ eq({0, 0, {
+ end_col = 0,
+ end_row = 1,
+ priority = 0,
+ hl_eol = true,
+ hl_mode = "blend",
+ hl_group = "String",
+ virt_text = { { "text", "Statement" } },
+ virt_text_pos = "right_align",
+ virt_text_hide = true,
+ virt_lines = { { { "lines", "Statement" } }},
+ virt_lines_above = true,
+ virt_lines_leftcol = true,
+ } }, get_extmark_by_id(ns, marks[1], { details = true }))
+ eq({0, 0, {
+ priority = 0,
+ virt_text = { { "text", "Statement" } },
+ virt_text_hide = false,
+ virt_text_pos = "win_col",
+ virt_text_win_col = 1,
+ } }, get_extmark_by_id(ns, marks[2], { details = true }))
+ end)
end)
describe('Extmarks buffer api with many marks', function()