From ecf225df574a48a4bbddf4978972b2b97184e92c Mon Sep 17 00:00:00 2001 From: Ibby <33922797+SleepySwords@users.noreply.github.com> Date: Mon, 3 Apr 2023 20:46:50 +1000 Subject: vim-patch:9.0.0944: 'cursorline' causes virtual text highlight to continue Problem: 'cursorline' causes virtual text highlight to continue. Solution: Save and restore line_attr. (closes vim/vim#11588) https://github.com/vim/vim/commit/6ac16f0c0fe923098b9df5ac430f1923045f16ea Co-authored-by: Bram Moolenaar --- test/functional/ui/decorations_spec.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test') diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 9be8c23ba4..77748eecb3 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1818,6 +1818,31 @@ bbbbbbb]]) | ]]} end) + + it('highlighting does not extend when no wrap is enabled with a long virtual text', function() + insert('abcdef') + command("set nowrap") + meths.buf_set_extmark(0, ns, 0, 3, + { virt_text = { { string.rep('X', 50), 'Special' } }, virt_text_pos = 'inline', right_gravity = false }) + feed('$') + screen:expect { grid = [[ + {28:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}de^f| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() -- cgit