File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ impl Query {
381381 if non_type_for_type_only_query || !self . matches_assoc_mode ( symbol. is_assoc ) {
382382 continue ;
383383 }
384- if ! self . include_hidden && symbol. name . starts_with ( "__" ) {
384+ if self . should_hide_query ( & symbol) {
385385 continue ;
386386 }
387387 if self . mode . check ( & self . query , self . case_sensitive , & symbol. name ) {
@@ -392,6 +392,11 @@ impl Query {
392392 }
393393 }
394394
395+ fn should_hide_query ( & self , symbol : & FileSymbol ) -> bool {
396+ // Hide symbols that start with `__` unless the query starts with `__`
397+ !self . include_hidden && symbol. name . starts_with ( "__" ) && !self . query . starts_with ( "__" )
398+ }
399+
395400 fn matches_assoc_mode ( & self , is_trait_assoc_item : bool ) -> bool {
396401 !matches ! (
397402 ( is_trait_assoc_item, self . assoc_mode) ,
You can’t perform that action at this time.
0 commit comments