diff options
author | Ibby <33922797+SleepySwords@users.noreply.github.com> | 2023-03-26 17:40:07 +1100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-05-22 13:49:42 +0200 |
commit | e12b5882af97126a9525a74a0955cc9e0f9114a9 (patch) | |
tree | c7575c34fb005926daf98cbdd76aa53e39f28ea3 /test/functional/ui | |
parent | dee3af2122d5072d351551ef023d2c177334b332 (diff) | |
download | rneovim-e12b5882af97126a9525a74a0955cc9e0f9114a9.tar.gz rneovim-e12b5882af97126a9525a74a0955cc9e0f9114a9.tar.bz2 rneovim-e12b5882af97126a9525a74a0955cc9e0f9114a9.zip |
vim-patch:9.0.0183: extra space after virtual text when 'linebreak' is set
Problem: Extra space after virtual text when 'linebreak' is set.
Solution: Do not count virtual text when getting linebreak value.
(closes vim/vim#10884)
https://github.com/vim/vim/commit/52de3a8d3943520bbd4e5e40a4c43fcc7182dac0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 91284e3a2f..4ed9d5a044 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1581,6 +1581,31 @@ bbbbbbb]]) | ]]} end) + + it('has correct cursor position with virtual text on an empty line', function() + command('set linebreak') + insert('one twoword') + feed('0') + meths.buf_set_extmark(0, ns, 0, 3, + { virt_text = { { ': virtual text', 'Special' } }, virt_text_pos = 'inline' }) + screen:expect { grid = [[ + ^one{28:: virtual text} twoword | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() |