aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-01 06:45:27 +0800
committerGitHub <noreply@github.com>2023-09-01 06:45:27 +0800
commit592a8f1e90d5abaa695280bf6d41a547b3631d0d (patch)
tree14fb727e24abd4b9a0dbf66712006fefb4864e12 /test
parenta1bec02c1e105eb9f49d577e04bdbeadd5a05e38 (diff)
downloadrneovim-592a8f1e90d5abaa695280bf6d41a547b3631d0d.tar.gz
rneovim-592a8f1e90d5abaa695280bf6d41a547b3631d0d.tar.bz2
rneovim-592a8f1e90d5abaa695280bf6d41a547b3631d0d.zip
vim-patch:9.0.1828: cursor wrong with virt text before double-width char (#24967)
Problem: Wrong cursor position with virtual text before double-width char at window edge. Solution: Check for double-width char before adding virtual text size. closes: vim/vim#12977 https://github.com/vim/vim/commit/ac2d8815ae7a93c54b07cba76475cfb3f26a3ac6
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/decorations_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index ba8d548a57..62dbd57202 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -3244,6 +3244,19 @@ describe('decorations: inline virtual text', function()
|
]]}
end)
+
+ it('before double-width char that wraps', function()
+ exec([[
+ call setline(1, repeat('a', 40) .. '口' .. '12345')
+ normal! $
+ ]])
+ meths.buf_set_extmark(0, ns, 0, 40, { virt_text = { { ('b'):rep(9) } }, virt_text_pos = 'inline' })
+ screen:expect{grid=[[
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbb{1:>}|
+ 口1234^5 |
+ |
+ ]]}
+ end)
end)
describe('decorations: virtual lines', function()