-
Notifications
You must be signed in to change notification settings - Fork 761
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
More refactoring of SearchGroup #276
Merged
AlexPl292
merged 20 commits into
JetBrains:master
from
citizenmatt:refactor-searchgroup
Mar 31, 2021
Merged
More refactoring of SearchGroup #276
AlexPl292
merged 20 commits into
JetBrains:master
from
citizenmatt:refactor-searchgroup
Mar 31, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlexPl292
force-pushed
the
refactor-searchgroup
branch
from
March 5, 2021 07:36
fc8420e
to
7a2b2c5
Compare
This method is the main implementation for '/' and '?' and does not support a count. It is currently being used incorrectly in places that should be using a simpler find helper.
The method is doing more than just searching, such as parsing the search command and state management
Searching no longer uses the high level search APIs that affect state such as saved searches, history and highlighting. Also conforms better to vim-multiple-cursors behaviour: * Searches are now case sensitive * Regular expressions in search text are ignored * "Select all" works with nowrapscan * Next occurrence based on existing selection no longer uses word boundary flag * "No more matches" message shown at more appropriate times
AlexPl292
force-pushed
the
refactor-searchgroup
branch
from
March 5, 2021 07:38
7a2b2c5
to
78bc406
Compare
Matt, I've rebased your PR on the latest master and found several things:
|
Oh wow. Saved by another PR! I did merge latest and reapplied the changes to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR continues the work started in #260. It refactors
SearchGroup
to provide a more appropriate API that handles user initiated search and substitution.SearchGroup
maintains (global) state and highlights results. TheSearchHelper
class is intended as a lower level API that does not require state, and is an appropriate API to use from extensions.This PR will:
SearchGroup
and update usages to useSearchHelper
or other appropriate APIs.CommandFlags.FLAG_SEARCH_FWD
andFLAG_SEARCH_REV
. The commands simply pass direction into theSearchGroup
APIs'nowrapscan'
, so only finds to the end of the file