Skip to content

Commit ee2a6e5

Browse files
committed
fix: clear all marks not persisting changes
The UI was calling storage.clear_all_marks() directly which only cleared marks in memory. Now uses the main module's method to properly save changes. Solves: #16
1 parent ace36b6 commit ee2a6e5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

lua/marksman/ui.lua

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,16 +434,10 @@ local function setup_window_keymaps(buf, marks, project_name, mark_info, search_
434434
end
435435

436436
local function clear_all_marks()
437-
vim.ui.select({ "Yes", "No" }, {
438-
prompt = "Clear all marks in this project?",
439-
}, function(choice)
440-
if choice == "Yes" then
441-
local storage = require("marksman.storage")
442-
storage.clear_all_marks()
443-
close_window()
444-
notify("󰃀 All marks cleared", vim.log.levels.INFO)
445-
end
446-
end)
437+
local marksman = require("marksman")
438+
marksman.clear_all_marks()
439+
close_window()
440+
notify("󰃀 All marks cleared", vim.log.levels.INFO)
447441
end
448442

449443
local keymap_opts = { buffer = buf, noremap = true, silent = true }

0 commit comments

Comments
 (0)