aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-22 18:15:04 +0800
committerGitHub <noreply@github.com>2023-06-22 18:15:04 +0800
commitf4f1ce1d167c557e54153f74cf0f55245b8fd414 (patch)
tree29b29b521db1805c5fea0543fe7f0969f0be7cda /test/functional
parent958cc22836f199c90eea680847843574ec54ebfe (diff)
downloadrneovim-f4f1ce1d167c557e54153f74cf0f55245b8fd414.tar.gz
rneovim-f4f1ce1d167c557e54153f74cf0f55245b8fd414.tar.bz2
rneovim-f4f1ce1d167c557e54153f74cf0f55245b8fd414.zip
fix(extmarks): hide inline virt_text properly with 'smoothscroll' (#24106)
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/decorations_spec.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 6772ef036a..419a16e7b5 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -2316,6 +2316,38 @@ bbbbbbb]])
]]}
end)
+ it('smoothscroll works correctly when virtual text wraps', function()
+ insert('foobar')
+ meths.buf_set_extmark(0, ns, 0, 3,
+ { virt_text = { { string.rep('X', 55), 'Special' } }, virt_text_pos = 'inline' })
+ command('setlocal smoothscroll')
+ screen:expect{grid=[[
+ foo{10:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}|
+ {10:XXXXXXXX}ba^r |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ feed('<C-E>')
+ screen:expect{grid=[[
+ {1:<<<}{10:XXXXX}ba^r |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ end)
+
it('in diff mode is highlighted correct', function()
insert([[
9000