From 34b57508a78b0a980e898ee35d950db0a90368ca Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 17 Mar 2024 05:43:14 +0800 Subject: fix(drawline): check filler_todo in place of removed draw_state (#27889) The only place it matters is the conceal wcol check, but it can avoid unnecessary computations at other places. --- test/functional/ui/decorations_spec.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 98d221be7d..8ab038bf60 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -4065,6 +4065,8 @@ describe('decorations: virtual lines', function() [7] = {foreground = Screen.colors.SlateBlue}; [8] = {background = Screen.colors.WebGray, foreground = Screen.colors.DarkBlue}; [9] = {foreground = Screen.colors.Brown}; + [10] = {bold = true, reverse = true}; + [11] = {reverse = true}; } ns = api.nvim_create_namespace 'test' @@ -4860,6 +4862,22 @@ if (h->n_buckets < new_n_buckets) { // expand ]]) end) + it('does not break cursor position with concealcursor #27887', function() + command('vsplit') + insert('\n') + api.nvim_set_option_value('conceallevel', 2, {}) + api.nvim_set_option_value('concealcursor', 'niv', {}) + api.nvim_buf_set_extmark(0, ns, 0, 0, { virt_lines = {{{'VIRT1'}}, {{'VIRT2'}}} }) + screen:expect([[ + │ | + VIRT1 │VIRT1 | + VIRT2 │VIRT2 | + ^ │ | + {1:~ }│{1:~ }|*6 + {10:[No Name] [+] }{11:[No Name] [+] }| + | + ]]) + end) end) describe('decorations: signs', function() -- cgit