shallow copy when getting all bookmarks
This commit is contained in:
6
init.lua
6
init.lua
@@ -44,7 +44,11 @@ local save_bookmark = ya.sync(function(state, idx)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
local all_bookmarks = ya.sync(function(state, append_last_dir)
|
local all_bookmarks = ya.sync(function(state, append_last_dir)
|
||||||
bookmarks = state.bookmarks or {}
|
local bookmarks = {}
|
||||||
|
|
||||||
|
for _, value in pairs(state.bookmarks) do
|
||||||
|
table.insert(bookmarks, value)
|
||||||
|
end
|
||||||
|
|
||||||
if append_last_dir and state.last_dir then
|
if append_last_dir and state.last_dir then
|
||||||
table.insert(bookmarks, state.last_dir)
|
table.insert(bookmarks, state.last_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user