mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
fix(lua): make vim.deepcopy
work with vim.NIL
style: changed double quotes to single quotes feat: add tests fix tests
This commit is contained in:
@@ -49,6 +49,9 @@ vim.deepcopy = (function()
|
||||
if f then
|
||||
return f(orig, cache or {})
|
||||
else
|
||||
if type(orig) == 'userdata' and orig == vim.NIL then
|
||||
return vim.NIL
|
||||
end
|
||||
error('Cannot deepcopy object of type ' .. type(orig))
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user