-
Notifications
You must be signed in to change notification settings - Fork 7.6k
File Filters affect "Find In..." #7149
Comments
That seems fair. For a subtree it's definitely still useful, but suppressing the filter for a single-file search makes sense to me. |
In a file tree, a filter affecting the whole scope should still not be used. |
Well, there's only one filter you can edit right now. You might want a different filter when your search is specific to a certain subtree, just as you might want a different filter when you switch projects... but you can always edit the filter in that case. I don't think preemptively turning off all filtering abilities makes sense for subtree searches. Filtering is still very useful if the subtree is large. By "affecting the whole scope" do you mean cases where the filter screens out every file in the selected subtree? We could give some sort of UI feedback in cases where 0 files pass the filter, so it's more clear what happened. (It actually might be useful in general to indicate how many or what percentage of the files in scope were searched vs. filtered out -- that's definitely a nice enhancement too). |
I'd like to see that enhancement as well. But here's an example on what I meant:
or this:
Now |
Reviewed - medium priority to me |
* When search scope is a single file, skip exclusion filter entirely * If exclusions filter results in 0 files to search, show a message to that effect and leave search bar open so user can adjust filter * When editing a filter, show how many files are still included out of the total number of files in the current search scope Also cleans up FindInFiles to centralize the filtering code more, and simplify _doSearchInOneFile() & its call sites.
@SAplayer The approach we decided on is threefold:
|
File exclusions usability improvements (bug #7149)
Closing as fixed - @SAplayer if you'd like to check it out in master, please let us know if you run into any issues. |
Works fine. Thanks. |
FindInFiles.js
in the Brackets project (add it to the Working Files)Find in...
Edit...
the filter to containsrc/search/FindInFiles.js
Initial
Result: No results
Expected: Imo in this case, where the scope is just a single file, the filters shouldn't be active
The text was updated successfully, but these errors were encountered: