Return Result by value from MatchItem

This commit is contained in:
Junegunn Choi
2026-02-28 15:02:06 +09:00
parent 2db14b4308
commit 8452c78cc8
2 changed files with 16 additions and 17 deletions

View File

@@ -260,7 +260,7 @@ func Run(opts *Options) (int, error) {
return false
}
mutex.Lock()
if result, _, _ := pattern.MatchItem(&item, false, slab); result != nil {
if result, _, _ := pattern.MatchItem(&item, false, slab); result.item != nil {
opts.Printer(transformer(&item))
found = true
}