-
Notifications
You must be signed in to change notification settings - Fork 330
search: Restore implied 'AND' behavior in non-regex file match mode #3659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR restores the traditional "implied AND" behavior for file search in non-regex mode. Previously (before version 6.6), when users entered multiple words separated by spaces, the search would require all words to match. This functionality was lost when switching to GPatternSpec for glob matching, and this PR restores it.
Key changes:
- Simplified query editor logic to pass raw search strings to the search engine in non-regex mode
- Modified search engine to split search strings by whitespace and create multiple pattern specs
- Implemented AND logic where all word patterns must match for a file to be included in results
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/nemo-query-editor.c | Removed automatic asterisk wrapping in non-regex mode, delegating this responsibility to the search engine |
| libnemo-private/nemo-search-engine-advanced.c | Changed from single GPatternSpec to list of patterns, implementing word splitting and AND matching logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
82fdf0f to
bacc880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
mode. If multiple words are encountered, they will be treated as separate search terms and be matched separately, requiring all to 'hit' for a file to be included in results. Full wildcard matching will still work for each word. ref: linuxmint/mint22.3-beta#29
bacc880 to
c7392ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
If multiple words are encountered, they will be treated as separate search terms and be matched separately, requiring all to 'hit' for a file to be included in results.
Full wildcard matching will still work for each word.
ref:
linuxmint/mint22.3-beta#29