aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/api/extmark_spec.lua2
-rw-r--r--test/functional/ui/bufhl_spec.lua2
-rw-r--r--test/functional/ui/decorations_spec.lua26
3 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index 06eb938927..56383986f3 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -1549,6 +1549,7 @@ describe('API/extmarks', function()
virt_lines_above = true,
virt_lines_leftcol = true,
virt_text = { { "text", "Macro" }, { "???" }, { "stack", { "Type", "Search" } } },
+ virt_text_repeat_linebreak = false,
virt_text_hide = true,
virt_text_pos = "right_align",
} }, get_extmark_by_id(ns, marks[1], { details = true }))
@@ -1557,6 +1558,7 @@ describe('API/extmarks', function()
right_gravity = true,
priority = 0,
virt_text = { { "", "Macro" }, { "", { "Type", "Search" } }, { "" } },
+ virt_text_repeat_linebreak = false,
virt_text_hide = false,
virt_text_pos = "win_col",
virt_text_win_col = 1,
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua
index f7b8144ff9..e47ab273bd 100644
--- a/test/functional/ui/bufhl_spec.lua
+++ b/test/functional/ui/bufhl_spec.lua
@@ -644,6 +644,7 @@ describe('Buffer highlighting', function()
virt_text = s1,
-- other details
right_gravity = true,
+ virt_text_repeat_linebreak = false,
virt_text_pos = 'eol',
virt_text_hide = false,
}}}, get_extmarks(id1, {0,0}, {0, -1}, {details=true}))
@@ -656,6 +657,7 @@ describe('Buffer highlighting', function()
virt_text = s2,
-- other details
right_gravity = true,
+ virt_text_repeat_linebreak = false,
virt_text_pos = 'eol',
virt_text_hide = false,
}}}, get_extmarks(id1, {lastline,0}, {lastline, -1}, {details=true}))
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 0472b72e26..be0f41ef6b 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -2094,6 +2094,32 @@ describe('extmark decorations', function()
|
]]}
end)
+
+ it('virt_text_repeat_linebreak repeats virtual text on wrapped lines', function()
+ screen:try_resize(40, 5)
+ meths.set_option_value('breakindent', true, {})
+ insert(example_text)
+ meths.buf_set_extmark(0, ns, 1, 0, { virt_text = {{'│', 'NonText'}}, virt_text_pos = 'overlay', virt_text_repeat_linebreak = true })
+ meths.buf_set_extmark(0, ns, 1, 3, { virt_text = {{'│', 'NonText'}}, virt_text_pos = 'overlay', virt_text_repeat_linebreak = true })
+ command('norm gg')
+ screen:expect{grid=[[
+ ^for _,item in ipairs(items) do |
+ {1:│} {1:│}local text, hl_id_cell, count = unpa|
+ {1:│} {1:│}ck(item) |
+ if hl_id_cell ~= nil then |
+ |
+ ]]}
+ meths.buf_clear_namespace(0, ns, 0, -1)
+ meths.buf_set_extmark(0, ns, 1, 0, { virt_text = {{'│', 'NonText'}}, virt_text_repeat_linebreak = true, virt_text_win_col = 0 })
+ meths.buf_set_extmark(0, ns, 1, 0, { virt_text = {{'│', 'NonText'}}, virt_text_repeat_linebreak = true, virt_text_win_col = 2 })
+ screen:expect{grid=[[
+ ^for _,item in ipairs(items) do |
+ {1:│} {1:│} local text, hl_id_cell, count = unpa|
+ {1:│} {1:│} ck(item) |
+ if hl_id_cell ~= nil then |
+ |
+ ]]}
+ end)
end)
describe('decorations: inline virtual text', function()