awful.util: change table.clone to do deep copies
Signed-off-by: Lukas Hrazky <lukkash@email.cz> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
c09582dca3
commit
a079ab654d
|
@ -339,8 +339,12 @@ end
|
|||
function table.clone(t)
|
||||
local c = { }
|
||||
for k, v in pairs(t) do
|
||||
if type(v) == "table" then
|
||||
c[k] = table.clone(v)
|
||||
else
|
||||
c[k] = v
|
||||
end
|
||||
end
|
||||
return c
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue