Skip to content

Commit dae583b

Browse files
committed
add guard for empty search string
1 parent 698d5b8 commit dae583b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.configs/zed/scripts/fzf-search.fish

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ set -l preview_cmd '
2727
set -l file {1}
2828
set -l line {2}
2929
set -l q {q}
30+
31+
if test -z "$file" -o "$file" = ""
32+
echo "Start typing to search..."
33+
exit 0
34+
end
35+
3036
set -l start (math "max(1, $line-10)")
3137
set -l end (math $line+10)
3238
if test -n "$q"

0 commit comments

Comments
 (0)