From 15a9a1c4ce290d713306fb2c6989c8a3ee53bf92 Mon Sep 17 00:00:00 2001 From: Stefan Rakel Date: Thu, 30 Oct 2025 15:41:19 +0100 Subject: [PATCH] Only create .bookmarks file if needed or already there on saving --- lua/bookmark.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/bookmark.lua b/lua/bookmark.lua index b4b5be4..13b0f3b 100644 --- a/lua/bookmark.lua +++ b/lua/bookmark.lua @@ -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))