File tree Expand file tree Collapse file tree
crates/fff-query-parser/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,13 +91,10 @@ pub trait ParserConfig {
9191 has_wildcards ( token)
9292 }
9393
94- /// When `true`, a PathSegment constraint that is the ONLY token in the
95- /// query is demoted to fuzzy text. Grep modes enable this because the
96- /// user is typing a search term (e.g. `/api/tests`), not scoping to a
97- /// directory. File-search modes keep the default (`false`) so that
98- /// `/src/` still filters by directory.
94+ /// If `true`, a PathSegment constraint that is the ONLY token in the
95+ /// query is demoted to fuzzy text to avoid over filtering
9996 fn treat_lone_path_as_text ( & self ) -> bool {
100- false
97+ true
10198 }
10299
103100 /// Custom constraint parsers for picker-specific needs
@@ -146,10 +143,6 @@ impl ParserConfig for GrepConfig {
146143 false
147144 }
148145
149- fn treat_lone_path_as_text ( & self ) -> bool {
150- true
151- }
152-
153146 /// Only recognise globs that are clearly directory/path oriented.
154147 ///
155148 /// Characters like `?`, `[`, and bare `*` (without `/`) are extremely
@@ -222,10 +215,6 @@ impl ParserConfig for AiGrepConfig {
222215 false
223216 }
224217
225- fn treat_lone_path_as_text ( & self ) -> bool {
226- true
227- }
228-
229218 fn is_glob_pattern ( & self , token : & str ) -> bool {
230219 // First check GrepConfig's strict rules (path globs, brace expansion)
231220 if GrepConfig . is_glob_pattern ( token) {
You can’t perform that action at this time.
0 commit comments