tests/ui: make screen.lua use "linegrid" representation internally

PR #8221 took a short-cut when implementing the tests: screen.lua would
translate the linegrid highlight ids back into the old per-cell
attribute description.

Apart from cleaning up technical debt, this enables to check both rgb
and cterm colors in the same expect(), which previously was needlessly
restricted to ext_hlstate tests only.
This commit is contained in:
Björn Linse
2019-10-11 19:27:15 +02:00
parent 9af0fe529d
commit 5a85699425
3 changed files with 63 additions and 51 deletions

View File

@@ -259,7 +259,7 @@ describe('ext_hlstate detailed highlights', function()
it("can use independent cterm and rgb colors", function()
-- tell test module to save all attributes (doesn't change nvim options)
screen:set_hlstate_cterm(true)
screen:set_rgb_cterm(true)
screen:set_default_attr_ids({
[1] = {{bold = true, foreground = Screen.colors.Blue1}, {foreground = 12}, {{hi_name = "NonText", ui_name = "EndOfBuffer", kind = "ui"}}},