diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-19 11:54:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 03:54:42 +0000 |
commit | 35b35cb93cb54d2a9b7f881b930ba42186e57d23 (patch) | |
tree | 13e30c46ed8d9621bf5f0118f0f0952d42943fee /test/functional/ui/decorations_spec.lua | |
parent | 0b710c8e55930a082e030f980f84bd1e71a29592 (diff) | |
download | rneovim-35b35cb93cb54d2a9b7f881b930ba42186e57d23.tar.gz rneovim-35b35cb93cb54d2a9b7f881b930ba42186e57d23.tar.bz2 rneovim-35b35cb93cb54d2a9b7f881b930ba42186e57d23.zip |
vim-patch:9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit (#29793)
Problem: Wrong cursor position with 'breakindent' when a double-width
character doesn't fit in a screen line (mikoto2000)
Solution: Include the width of the 'breakindent' properly.
(zeertzjq)
fixes: vim/vim#15289
closes: vim/vim#15290
https://github.com/vim/vim/commit/b5d6b5caac752fe15856e37fd3abc5459292d4b8
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 318dc8c197..eda95b8991 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -4027,11 +4027,23 @@ describe('decorations: inline virtual text', function() normal! $ ]]) api.nvim_buf_set_extmark(0, ns, 0, 40, { virt_text = { { ('b'):rep(9) } }, virt_text_pos = 'inline' }) - screen:expect{grid=[[ + screen:expect([[ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbb{1:>}| 口1234^5 | | - ]]} + ]]) + feed('g0') + screen:expect([[ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbb{1:>}| + ^口12345 | + | + ]]) + command('set showbreak=+++') + screen:expect([[ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbb{1:>}| + {1:+++}^口12345 | + | + ]]) end) end) |