1
0

Only create .bookmarks file if needed or already there on saving

This commit is contained in:
Stefan Rakel
2025-10-30 15:41:19 +01:00
parent dc06743de3
commit 15a9a1c4ce

View File

@@ -51,7 +51,7 @@ function M.loadBookmarks()
end
function M.saveBookmarks()
if #bookmarks > 0 or vim.fn.filereadable(bookmarksFilePath) then
if #bookmarks > 0 or vim.fn.filereadable(bookmarksFilePath) == 1 then
local file = io.open(bookmarksFilePath, "w")
if file then
file:write(vim.json.encode(bookmarks))