From 05bba5994bd178930ffb6ef7c32f3e30d72539dd Mon Sep 17 00:00:00 2001 From: Caleb Heuer Date: Fri, 5 May 2023 01:08:20 -0600 Subject: Fix being unable to remove all harpoons --- harpoon.kak | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/harpoon.kak b/harpoon.kak index f8e7882..cebbc22 100644 --- a/harpoon.kak +++ b/harpoon.kak @@ -50,11 +50,15 @@ define-command harpoon-show-list -docstring "harpoon-show-list: show all harpoon define-command -hidden harpoon-update-from-list %{ evaluate-commands -save-regs dquote %{ - execute-keys -draft -save-regs '' '%^\d*:;wly' - evaluate-commands %sh{ - echo "set-option global harpoon_files $kak_quoted_reg_dquote" + try %{ + execute-keys -draft -save-regs '' '%^\d*:;wly' + evaluate-commands %sh{ + echo "set-option global harpoon_files $kak_quoted_reg_dquote" + } + harpoon-show-list + } catch %{ + set-option global harpoon_files } - harpoon-show-list echo "Updated harpoons" } } -- cgit v1.2.3