mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(config): deepcopy config where needed
This commit is contained in:
parent
0d91a4e364
commit
6c76f91398
2 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ function M.config.get(snack, defaults, ...)
|
|||
for i = 1, select("#", ...) do
|
||||
local v = select(i, ...)
|
||||
if v then
|
||||
table.insert(merge, v)
|
||||
table.insert(merge, vim.deepcopy(v))
|
||||
end
|
||||
end
|
||||
return vim.tbl_deep_extend("force", unpack(merge))
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ function M.resolve(...)
|
|||
local stack = { ... }
|
||||
while #stack > 0 do
|
||||
local next = table.remove(stack)
|
||||
next = type(next) == "table" and next or Snacks.config.styles[next]
|
||||
next = type(next) == "table" and next or vim.deepcopy(Snacks.config.styles[next])
|
||||
---@cast next snacks.win.Config?
|
||||
if next then
|
||||
table.insert(merge, 1, next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue