feat(ui): allow to set the highlight namespace per window

- reimplement 'winhl' in terms of highlight namespaces
- check for EOF in screen tests (to indicate a likely crash)
This commit is contained in:
bfredl
2022-07-25 10:16:33 +02:00
parent f7cfca49d6
commit d879331b0d
30 changed files with 596 additions and 244 deletions

View File

@@ -193,7 +193,7 @@ describe('decorations providers', function()
|
]]}
meths._set_hl_ns(ns1)
meths.set_hl_ns(ns1)
screen:expect{grid=[[
{10: 1 }{11:// just to see if there was an accid}|
{10: }{11:ent} |
@@ -219,7 +219,7 @@ describe('decorations providers', function()
local ns2 = a.nvim_create_namespace 'ns2'
a.nvim_set_decoration_provider (ns2, {
on_win = function (_, win, buf)
a.nvim__set_hl_ns(win == thewin and _G.ns1 or ns2)
a.nvim_set_hl_ns_fast(win == thewin and _G.ns1 or ns2)
end;
})
]]
@@ -266,7 +266,7 @@ describe('decorations providers', function()
]]}
meths.set_hl(ns1, 'LinkGroup', {fg = 'Blue'})
meths._set_hl_ns(ns1)
meths.set_hl_ns(ns1)
screen:expect{grid=[[
// just to see if there was an accident |
@@ -302,7 +302,7 @@ describe('decorations providers', function()
]]}
meths.set_hl(ns1, 'LinkGroup', {fg = 'Blue', default=true})
meths._set_hl_ns(ns1)
meths.set_hl_ns(ns1)
feed 'k'
screen:expect{grid=[[