You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fuzzy filter treats inner whitespace as a literal character: "open file" can't find OpenFile.cs, and a double space or tab hides everything #142
The fuzzy path passes the filter to Fuzzy.Contains after trimming only the ends (TextFilter/TextFilter.cs:251: Fuzzy.Contains(text.AsSpan(), filter.AsSpan().Trim(), out score)). Whitespace inside the query is a character the text must contain, unlike Glob and Regex, where whitespace separates tokens.
Expected: a word break in a fuzzy query still finds OpenFile.cs and open_file.cs (as openfile already does), and an extra space or a tab doesn't empty the list.
Why it matters
#115 trimmed leading/trailing padding on the grounds that padding shouldn't become a space the text must contain; inner spaces have the same problem. A natural two-word query, or an accidental double space, silently hides real matches, and fuzzy behaves differently from the other two filter types.
Suggested fix
Either:
(a) Strip all whitespace from the fuzzy filter before calling Fuzzy.Contains (smallest change), or
(b) Split on whitespace, require every piece to fuzzy-match, and sum the scores. This would also give TextFilterMatchOptions a meaning for fuzzy, which it currently ignores.
Acceptance: the repro's "open file", "open file" and "open\tfile" queries match OpenFile.cs, open_file.cs and open file dialog, and not SaveFile.cs.
Priority: Medium. A natural two-word query, or an accidental double space, silently hides real matches in the fuzzy mode, and fuzzy treats whitespace differently from Glob and Regex. The workaround of typing without spaces exists but is not obvious.
Suggested area / assignment:TextFilter/TextFilter.cs fuzzy path (around line 251)
Recommended next step: Option (a), stripping all whitespace, is the smallest fix. Option (b), splitting into tokens that must all match, is more consistent with the other filter types and gives TextFilterMatchOptions a meaning under fuzzy. That makes (b) the better choice if the API change is acceptable.
Activity
matt-edmondson commentedon Oct 6, 2026
Triage
TextFilter/TextFilter.csfuzzy path (around line 251)Recommended next step: Option (a), stripping all whitespace, is the smallest fix. Option (b), splitting into tokens that must all match, is more consistent with the other filter types and gives
TextFilterMatchOptionsa meaning under fuzzy. That makes (b) the better choice if the API change is acceptable.Generated by Claude Code