Only create .bookmarks file if needed or already there on saving
This commit is contained in:
@@ -51,7 +51,7 @@ function M.loadBookmarks()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.saveBookmarks()
|
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")
|
local file = io.open(bookmarksFilePath, "w")
|
||||||
if file then
|
if file then
|
||||||
file:write(vim.json.encode(bookmarks))
|
file:write(vim.json.encode(bookmarks))
|
||||||
|
|||||||
Reference in New Issue
Block a user