diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-30 20:35:25 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-30 20:35:25 +0000 |
commit | 1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch) | |
tree | cd08258054db80bb9a11b1061bb091c70b76926a /test/functional/ui/bufhl_spec.lua | |
parent | eaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.gz rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.bz2 rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.zip |
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'test/functional/ui/bufhl_spec.lua')
-rw-r--r-- | test/functional/ui/bufhl_spec.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua index 46bfae8de2..81e514c9aa 100644 --- a/test/functional/ui/bufhl_spec.lua +++ b/test/functional/ui/bufhl_spec.lua @@ -303,7 +303,7 @@ describe('Buffer highlighting', function() {1:~ }| {1:~ }| {1:~ }| - 2 change3; before #3 {MATCH:.*}| + 2 changes; before #3 {MATCH:.*}| ]]} command('undo') @@ -751,8 +751,8 @@ describe('Buffer highlighting', function() it('validates contents', function() -- this used to leak memory - eq('Chunk is not an array', pcall_err(set_virtual_text, id1, 0, {"texty"}, {})) - eq('Chunk is not an array', pcall_err(set_virtual_text, id1, 0, {{"very"}, "texty"}, {})) + eq("Invalid 'chunk': expected Array, got String", pcall_err(set_virtual_text, id1, 0, {"texty"}, {})) + eq("Invalid 'chunk': expected Array, got String", pcall_err(set_virtual_text, id1, 0, {{"very"}, "texty"}, {})) end) it('can be retrieved', function() @@ -762,10 +762,9 @@ describe('Buffer highlighting', function() local s1 = {{'Köttbullar', 'Comment'}, {'Kräuterbutter'}} local s2 = {{'こんにちは', 'Comment'}} - -- TODO: only a virtual text from the same ns currently overrides - -- an existing virtual text. We might add a prioritation system. set_virtual_text(id1, 0, s1, {}) eq({{1, 0, 0, { + ns_id = 1, priority = 0, virt_text = s1, -- other details @@ -774,10 +773,10 @@ describe('Buffer highlighting', function() virt_text_hide = false, }}}, get_extmarks(id1, {0,0}, {0, -1}, {details=true})) - -- TODO: is this really valid? shouldn't the max be line_count()-1? local lastline = line_count() set_virtual_text(id1, line_count(), s2, {}) eq({{3, lastline, 0, { + ns_id = 1, priority = 0, virt_text = s2, -- other details |