677f5010daf226509cc19d7244a689df82820c82
- Author
- ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
feat(wd): update to 498695ff (#12507)
Closes #12489
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
Diff
1diff --git a/.github/dependencies.yml b/.github/dependencies.yml
2index ce28e34c984154ca8c3f73e17b0c3bda56301471..43ec92fb7846fcb0dd13ee309cc9a8a25352122a 100644
3--- a/.github/dependencies.yml
4+++ b/.github/dependencies.yml
5@@ -39,7 +39,7 @@ dependencies:
6 plugins/wd:
7 repo: mfaerevaag/wd
8 branch: master
9- version: tag:v0.7.0
10+ version: tag:v0.7.1
11 precopy: |
12 set -e
13 rm -r test
14diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh
15index 160ab3be364682ceee8dfe9e4089d2729138fd2f..34f887a0ece21d3e42a5ef230e2fa3da7f657d31 100755
16--- a/plugins/wd/wd.sh
17+++ b/plugins/wd/wd.sh
18@@ -261,9 +261,9 @@ wd_browse() {
19 local entries=("${(@f)$(sed "s:${HOME}:~:g" "$WD_CONFIG" | awk -F ':' '{print $1 " -> " $2}')}")
20 local script_path="${${(%):-%x}:h}"
21 local wd_remove_output=$(mktemp "${TMPDIR:-/tmp}/wd.XXXXXXXXXX")
22- local entries_with_headers=("All warp points:" "Press enter to select. Press delete to remove" "${entries[@]}")
23+ entries=("All warp points:" "Press enter to select. Press delete to remove" "${entries[@]}")
24 local fzf_bind="delete:execute(echo {} | awk -F ' -> ' '{print \$1}' | xargs -I {} "$script_path/wd.sh" rm {} > "$wd_remove_output")+abort"
25- local fzf_command=$(printf '%s\n' "${entries_with_headers[@]}" | fzf --height 100% --reverse --header-lines=2 --bind="$fzf_bind")
26+ local selected_entry=$(printf '%s\n' "${entries[@]}" | fzf --height 100% --reverse --header-lines=2 --bind="$fzf_bind")
27 if [[ -e $wd_remove_output ]]; then
28 cat "$wd_remove_output"
29 rm "$wd_remove_output"
30@@ -287,8 +287,10 @@ wd_browse_widget() {
31 }
32
33 wd_restore_buffer() {
34- BUFFER=$saved_buffer
35- CURSOR=$saved_cursor
36+ if [[ -n $saved_buffer ]]; then
37+ BUFFER=$saved_buffer
38+ CURSOR=$saved_cursor
39+ fi
40 saved_buffer=
41 saved_cursor=1
42 }