Only create .bookmarks file if needed or already there on saving
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user