diff options
author | luukvbaal <luukvbaal@gmail.com> | 2023-05-21 13:00:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-21 19:00:37 +0800 |
commit | 60f69014a801891d084542cf98ba2aa0d476164a (patch) | |
tree | 01ac608cda5707e45832c8b5d11343cf1ae1d3a3 /test/functional/ui/statuscolumn_spec.lua | |
parent | 387c8ceb287308d4631c41bdbd6cc51e4fb3950f (diff) | |
download | rneovim-60f69014a801891d084542cf98ba2aa0d476164a.tar.gz rneovim-60f69014a801891d084542cf98ba2aa0d476164a.tar.bz2 rneovim-60f69014a801891d084542cf98ba2aa0d476164a.zip |
fix(redraw): multibyte characters are wrapped at the end of a line (#23696)
Problem: Multibyte characters may be wrapped at the end of a line
when 'statuscolumn' and 'spell' are set.
Solution: Update line pointerdiff "v" before fetching the line pointer
after evaluating 'statuscolumn'.
Diffstat (limited to 'test/functional/ui/statuscolumn_spec.lua')
-rw-r--r-- | test/functional/ui/statuscolumn_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/ui/statuscolumn_spec.lua b/test/functional/ui/statuscolumn_spec.lua index 3b41d3684a..3d68246ba9 100644 --- a/test/functional/ui/statuscolumn_spec.lua +++ b/test/functional/ui/statuscolumn_spec.lua @@ -674,4 +674,16 @@ describe('statuscolumn', function() ]]) eq(2, eval('g:stcnr')) end) + + it('does not wrap multibyte characters at the end of a line', function() + screen:try_resize(33, 4) + command([[set spell stc=%l\ ]]) + command('call setline(8, "This is a line that contains ᶏ multibyte character.")') + screen:expect([[ + 8 ^This is a line that contains ᶏ| + multibyte character. | + 9 aaaaa | + | + ]]) + end) end) |