aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorIbby <33922797+SleepySwords@users.noreply.github.com>2023-04-03 01:43:06 +1000
committerbfredl <bjorn.linse@gmail.com>2023-05-22 13:49:42 +0200
commit7423d3479d95e875e2d261d6e404ad19a631e530 (patch)
tree9afa0f58807561b4fe0eb17be90682b974277514 /test/functional
parent1936285d98f62a1357abf928b10c824cf9e3ff41 (diff)
downloadrneovim-7423d3479d95e875e2d261d6e404ad19a631e530.tar.gz
rneovim-7423d3479d95e875e2d261d6e404ad19a631e530.tar.bz2
rneovim-7423d3479d95e875e2d261d6e404ad19a631e530.zip
vim-patch:9.0.0716: with 'nowrap' virtual text "after" does not scroll left
Problem: With 'nowrap' virtual text "after" does not scroll left. Solution: Skip part of the virtual text that is left of the window. (closes vim/vim#11320) Fix going beyond the last column of the window. https://github.com/vim/vim/commit/cd105417a53fcf97c0935f3468201ef11516c9f1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/decorations_spec.lua27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 68c0e5eaca..ba3f73c229 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -1742,7 +1742,7 @@ bbbbbbb]])
]]}
end)
- it('no wrap is rendered correctly with multiple virtual text, where one is hidden', function()
+ it('draws correctly with no wrap multiple virtual text, where one is hidden', function()
insert('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz')
command("set nowrap")
meths.buf_set_extmark(0, ns, 0, 50,
@@ -1768,6 +1768,31 @@ bbbbbbb]])
|
]]}
end)
+
+ it('draws correctly with no wrap and a long virtual text', function()
+ insert('abcdefghi')
+ command("set nowrap")
+ meths.buf_set_extmark(0, ns, 0, 2,
+ { virt_text = { { string.rep('X', 55), 'Special' } }, virt_text_pos = 'inline', right_gravity = false })
+ feed('$')
+ screen:expect { grid = [[
+ {28:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}cdefgh^i|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ end)
end)
describe('decorations: virtual lines', function()