Skip to content

Commit 138299d

Browse files
Copilotsudo-tee
andauthored
fix: shallow copy in store.mutate via vim.tbl_extend (#333)
* fix: replace vim.deepcopy with vim.tbl_extend shallow copy in M.mutate Co-authored-by: sudo-tee <342110+sudo-tee@users.noreply.github.com>
1 parent 918a732 commit 138299d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/opencode/state/store.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function M.mutate(key, mutator)
210210
end
211211

212212
local current = _state[key]
213-
local old = vim.deepcopy(current)
213+
local old = vim.tbl_extend('force', {}, current)
214214
mutator(current)
215215
queue_emit(key, current, old)
216216
return current

0 commit comments

Comments
 (0)