mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
lua: vim.deepcopy uses empty_dict() instead of {} for empty_dict()
fix: https://github.com/neovim/nvim-lsp/issues/94
This commit is contained in:
@@ -20,6 +20,11 @@ vim.deepcopy = (function()
|
||||
local deepcopy_funcs = {
|
||||
table = function(orig)
|
||||
local copy = {}
|
||||
|
||||
if getmetatable(orig) == vim._empty_dict_mt then
|
||||
copy = vim.empty_dict()
|
||||
end
|
||||
|
||||
for k, v in pairs(orig) do
|
||||
copy[vim.deepcopy(k)] = vim.deepcopy(v)
|
||||
end
|
||||
|
Reference in New Issue
Block a user