github krisk/Fuse v7.4.0-beta.6

pre-release6 hours ago

Bug Fixes

includeMatches: true no longer reports stray highlight ranges far outside the actual match window. Previously, the bitap fuzzy scan marked every text character whose codepoint appeared in the search pattern's alphabet anywhere the scan visited, producing highlights like m, ic, l, o, ic scattered across olympic medical office when searching for olympics.

After the fix, highlight indices are restricted to the bitap-matched window ([bestLocation, bestLocation + patternLen - 1 + bestErrors]) plus exact-match windows from the index-of fast path.

Behavior change. Callers who built UIs around the previous noisier output may see fewer/narrower highlights. A residual tail of up to bestErrors characters can still appear immediately after the match window to preserve correctness in insertion-heavy fuzzy cases (e.g. abc vs abxc still highlights both ab and the matched c). To suppress short residual runs, set minMatchCharLength: N; runs shorter than N are filtered out.

Perf bonus. Removing the inner-loop mask write nets ~15% faster fuzzy search on +matches queries; non-+matches paths also pick up 2-5%.

Don't miss a new Fuse release

NewReleases is sending notifications on new releases.