ref(highlite): new metatable in use_background_with
We shouldn't alter the contents of `attributes` during the function call. Instead, we should create a new metatable for the background color table, and assign it that way.
This commit is contained in:
parent
a7a3bc11fe
commit
f643c9304d
|
@ -85,8 +85,10 @@ end
|
||||||
|
|
||||||
-- Load specific &bg instructions
|
-- Load specific &bg instructions
|
||||||
local function use_background_with(attributes)
|
local function use_background_with(attributes)
|
||||||
attributes.__index = attributes
|
return setmetatable(
|
||||||
return setmetatable(attributes[vim.o.background], attributes)
|
attributes[vim.o.background],
|
||||||
|
{['__index'] = attributes}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
Loading…
Reference in New Issue