diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-10-13 10:53:05 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-10-13 16:37:17 +0200 |
commit | 3d84cf6ff4361e318a0571c87d44e8a77c1c2839 (patch) | |
tree | 11e2b25522bc061c1ece66825e07cd018c68c377 /test/functional/ui/bufhl_spec.lua | |
parent | 8bbb28b9732bfa430a963f16498d8ec42c637ca9 (diff) | |
download | rneovim-3d84cf6ff4361e318a0571c87d44e8a77c1c2839.tar.gz rneovim-3d84cf6ff4361e318a0571c87d44e8a77c1c2839.tar.bz2 rneovim-3d84cf6ff4361e318a0571c87d44e8a77c1c2839.zip |
api: make nvim_buf_set_virtual_text handle invalid chars
Clients are supposed to supply only valid text, but if it is
invalid, translate it rather than messing up the screen
Diffstat (limited to 'test/functional/ui/bufhl_spec.lua')
-rw-r--r-- | test/functional/ui/bufhl_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua index ba3e44b677..29173ed7ee 100644 --- a/test/functional/ui/bufhl_spec.lua +++ b/test/functional/ui/bufhl_spec.lua @@ -413,5 +413,16 @@ describe('Buffer highlighting', function() | ]]) + set_virtual_text(0, 0, {{"x\tx\ny\ry", "Statement"}, {"aa\000bb", "Number"}}, {}) + screen:expect([[ + 1 + 2 {3:x^Ix^@y^My}{2:aa} | + ^5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5| + , 5, 5, 5, 5, 5, 5,{1:-} | + x = 4 | + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]) end) end) |