summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--search/search.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/search/search.go b/search/search.go
index d0d66eb..3ed8ea1 100644
--- a/search/search.go
+++ b/search/search.go
@@ -65,6 +65,9 @@ args_loop:
// uncertain about source, check ours to see if any match
for _, t := range src.Targets {
if t.Matches(arg) {
+ if len(t.Sub()) <= i {
+ continue
+ }
if slices.Equal(t.Sub(), subdir) {
target = t
targetSource = src