Skip to content

Commit f603aa4

Browse files
committed
fix: dubble confirm (#19)
1 parent a40bff7 commit f603aa4

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

assets/pic.png

-41.9 KB
Loading

assets/pic2.png

-60.8 KB
Loading

lua/marksman/ui.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,17 @@ local function setup_window_keymaps(buf, marks, project_name, mark_info, search_
523523
end
524524

525525
local function clear_all_marks()
526-
local marksman = require("marksman")
527-
marksman.clear_all_marks()
526+
vim.ui.select({ "Yes", "No" }, {
527+
prompt = "Clear all marks in this project?",
528+
}, function(choice)
529+
if choice == "Yes" then
530+
local marksman = require("marksman.storage")
531+
marksman.clear_all_marks()
532+
marksman.save_marks()
533+
close_window()
534+
notify("󰃀 All marks cleared", vim.log.levels.INFO)
535+
end
536+
end)
528537
end
529538

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

0 commit comments

Comments
 (0)