From 1e96065b63f334b0edde0bf327b2e804def069b2 Mon Sep 17 00:00:00 2001 From: Diogo Duarte Date: Sun, 31 Mar 2024 16:51:53 +0100 Subject: [PATCH] shallow copy when getting all bookmarks --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index bc80038..4093768 100644 --- a/init.lua +++ b/init.lua @@ -44,7 +44,11 @@ local save_bookmark = ya.sync(function(state, idx) end) 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 table.insert(bookmarks, state.last_dir)