diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-09-04 16:39:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 16:39:48 +0200 |
commit | ef5a09d4fc6b87343755db681dbc1c339b428296 (patch) | |
tree | dbf9bff6b291d8f6c978a79d44ba92320b296fc3 /test/functional/ui | |
parent | dd465bbccc72665a8e4dbfde09aa7f866b328fef (diff) | |
parent | 1832d18083446255aa04d63fac033aea08a65ed0 (diff) | |
download | rneovim-ef5a09d4fc6b87343755db681dbc1c339b428296.tar.gz rneovim-ef5a09d4fc6b87343755db681dbc1c339b428296.tar.bz2 rneovim-ef5a09d4fc6b87343755db681dbc1c339b428296.zip |
Merge pull request #12816 from vigoux/decorations
New Decorations API (not finalized, but we gonna build on this)
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/bufhl_spec.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua index 3cb592c714..0262a5b59b 100644 --- a/test/functional/ui/bufhl_spec.lua +++ b/test/functional/ui/bufhl_spec.lua @@ -690,7 +690,7 @@ describe('Buffer highlighting', function() end) it('can be retrieved', function() - local get_virtual_text = curbufmeths.get_virtual_text + local get_extmarks = curbufmeths.get_extmarks local line_count = curbufmeths.line_count local s1 = {{'Köttbullar', 'Comment'}, {'Kräuterbutter'}} @@ -699,12 +699,14 @@ describe('Buffer highlighting', function() -- TODO: only a virtual text from the same ns curretly overrides -- an existing virtual text. We might add a prioritation system. set_virtual_text(id1, 0, s1, {}) - eq(s1, get_virtual_text(0)) + eq({{1, 0, 0, {virt_text = s1}}}, get_extmarks(id1, {0,0}, {0, -1}, {}, true)) - set_virtual_text(-1, line_count(), s2, {}) - eq(s2, get_virtual_text(line_count())) + -- 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, {virt_text = s2}}}, get_extmarks(id1, {lastline,0}, {lastline, -1}, {}, true)) - eq({}, get_virtual_text(line_count() + 9000)) + eq({}, get_extmarks(id1, {lastline+9000,0}, {lastline+9000, -1}, {}, false)) end) it('is not highlighted by visual selection', function() |