From 31509da9412d86ec782f66c9bd217fffaa3df4a2 Mon Sep 17 00:00:00 2001 From: alexekdahl Date: Mon, 3 Nov 2025 07:58:37 +0100 Subject: [PATCH] fix: dubble confirm --- lua/marksman/ui.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/marksman/ui.lua b/lua/marksman/ui.lua index 2db4775..6b860b8 100644 --- a/lua/marksman/ui.lua +++ b/lua/marksman/ui.lua @@ -523,8 +523,17 @@ local function setup_window_keymaps(buf, marks, project_name, mark_info, search_ end local function clear_all_marks() - local marksman = require("marksman") - marksman.clear_all_marks() + vim.ui.select({ "Yes", "No" }, { + prompt = "Clear all marks in this project?", + }, function(choice) + if choice == "Yes" then + local marksman = require("marksman.storage") + marksman.clear_all_marks() + storage_module.save_marks() + close_window() + notify("󰃀 All marks cleared", vim.log.levels.INFO) + end + end) end local keymap_opts = { buffer = buf, noremap = true, silent = true }