mirror of
https://github.com/neovim/neovim.git
synced 2026-05-05 21:45:05 +00:00
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:
@@ -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=[[
|
||||
|
||||
Reference in New Issue
Block a user