aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorIbby <33922797+SleepySwords@users.noreply.github.com>2023-04-12 18:21:46 +1000
committerbfredl <bjorn.linse@gmail.com>2023-05-22 13:49:42 +0200
commit5d7afb2e9f222c32dd18c9c2bca49cab8bf751bc (patch)
treeeec2b15afbb46844c718c51c0e4c7c2af7ae00d1 /test/functional
parent7423d3479d95e875e2d261d6e404ad19a631e530 (diff)
downloadrneovim-5d7afb2e9f222c32dd18c9c2bca49cab8bf751bc.tar.gz
rneovim-5d7afb2e9f222c32dd18c9c2bca49cab8bf751bc.tar.bz2
rneovim-5d7afb2e9f222c32dd18c9c2bca49cab8bf751bc.zip
fix(ui): fix tabs not being spaced properly after virtual text with no wrap
also fixes incorrect skipping of multibyte characters
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/decorations_spec.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index ba3f73c229..9be8c23ba4 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -1793,6 +1793,31 @@ bbbbbbb]])
|
]]}
end)
+
+ it('tabs are the correct length with no wrap following virtual text', function()
+ command('set nowrap')
+ feed('itest<TAB>a<ESC>')
+ meths.buf_set_extmark(0, ns, 0, 0,
+ { virt_text = { { string.rep('a', 55), 'Special' } }, virt_text_pos = 'inline' })
+ feed('gg$')
+ screen:expect { grid = [[
+ {28:aaaaaaaaaaaaaaaaaaaaaaaaa}test ^a |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ end)
end)
describe('decorations: virtual lines', function()