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
|
||||
local function use_background_with(attributes)
|
||||
attributes.__index = attributes
|
||||
return setmetatable(attributes[vim.o.background], attributes)
|
||||
return setmetatable(
|
||||
attributes[vim.o.background],
|
||||
{['__index'] = attributes}
|
||||
)
|
||||
end
|
||||
|
||||
--[[
|
||||
|
|
Loading…
Reference in New Issue