From bbd5c6363c25e8fbbfb962f8f6c5ea1800d431ca Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Tue, 26 Dec 2023 00:16:03 +0100 Subject: feat(extmarks): add virt_text_repeat_linebreak flag (#26625) Problem: Unable to predict which byte-offset to place virtual text to make it repeat visually in the wrapped part of a line. Solution: Add a flag to nvim_buf_set_extmark() that causes virtual text to repeat in wrapped lines. --- test/functional/api/extmark_spec.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/functional/api/extmark_spec.lua') 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, -- cgit