aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorIbby <33922797+SleepySwords@users.noreply.github.com>2023-04-19 19:02:33 +1000
committerbfredl <bjorn.linse@gmail.com>2023-05-22 13:49:42 +0200
commit34d862942c3387eaa9d2bba963d931d384031b90 (patch)
tree96dac7c53da801c0892811829067cfa35be47c51 /test/functional/ui
parent5547b16c40f92fbc75ad1b9a7b3dd1f5ff50cbb2 (diff)
downloadrneovim-34d862942c3387eaa9d2bba963d931d384031b90.tar.gz
rneovim-34d862942c3387eaa9d2bba963d931d384031b90.tar.bz2
rneovim-34d862942c3387eaa9d2bba963d931d384031b90.zip
fix(ui): fix virtual text not displaying when two overlapping inlines (nowrap)
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/decorations_spec.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 4579fad53f..68a5bb5f9a 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -1956,6 +1956,33 @@ bbbbbbb]])
|
]]}
end)
+
+ it('correctly draws when there are multiple overlapping virtual texts on the same line with nowrap', function()
+ command('set nowrap')
+ insert('a')
+ meths.buf_set_extmark(0, ns, 0, 0,
+ { virt_text = { { string.rep('a', 55), 'Special' } }, virt_text_pos = 'inline' })
+ meths.buf_set_extmark(0, ns, 0, 0,
+ { virt_text = { { string.rep('b', 55), 'Special' } }, virt_text_pos = 'inline' })
+ feed('$')
+ screen:expect { grid = [[
+ {28:bbbbbbbbbbbbbbbbbbbbbbbbb}^a |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ end)
end)
describe('decorations: virtual lines', function()