From a6d7bd6a380a8591d00b6d55595f3fdbd2e65cd5 Mon Sep 17 00:00:00 2001 From: Caleb Heuer Date: Mon, 25 Mar 2024 15:39:35 -0600 Subject: Fix harpoons buffer not using the correct state file --- harpoon.kak | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/harpoon.kak b/harpoon.kak index 3a8f1c3..def4dbd 100644 --- a/harpoon.kak +++ b/harpoon.kak @@ -112,6 +112,10 @@ define-command -hidden harpoon-save %{ define-command -hidden harpoon-check %{ evaluate-commands %sh{ + # Ignore scratch files + if [ -z "${kak_buffile%\**\*}" ]; then + exit + fi git_branch=$(git -C "${kak_buffile%/*}" rev-parse --abbrev-ref HEAD 2>/dev/null) state_file=$(printf "%s" "$PWD-$git_branch" | sed -e 's|_|__|g' -e 's|/|_-|g') state_dir=${XDG_STATE_HOME:-~/.local/state}/kak/harpoon -- cgit v1.2.3