diff options
| author | Caleb Heuer <ch@raiguard.me> | 2024-03-25 15:39:35 -0600 |
|---|---|---|
| committer | Caleb Heuer <ch@raiguard.me> | 2024-03-25 15:39:35 -0600 |
| commit | a6d7bd6a380a8591d00b6d55595f3fdbd2e65cd5 (patch) | |
| tree | 450006d73ee7fe5697dd2c8e2d8ec95ec10c7f42 /harpoon.kak | |
| parent | 055a8075de4622d6308e9dbc8fa97d5b5721c4b7 (diff) | |
Fix harpoons buffer not using the correct state filemain
Diffstat (limited to 'harpoon.kak')
| -rw-r--r-- | harpoon.kak | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
