-
Notifications
You must be signed in to change notification settings - Fork 228
FindReplaceOverlay: use search-as-you-type in regex mode #1911 #2655
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
FindReplaceOverlay: use search-as-you-type in regex mode #1911 #2655
Conversation
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Test Results 1 821 files ±0 1 821 suites ±0 1h 27m 19s ⏱️ - 1m 45s Results for commit 8bd6fc0. ± Comparison against base commit 36c6b93. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
2970bb6 to
020d00d
Compare
|
@jukzi may I ask you to test whether this change fixes the behavior/issue you reported in #2066 (comment) for performing text replacements in regex mode? |
|
I was reading this yesterday and I wondered if this is really such a great idea. With more complex regular expressions you often end up in an intermediate state with syntax errors. Moreover if I type |
|
testing this PR i found this Error in my Log: |
|
beside the error i think it's intuitive to have search as you type enabled for regexp as provided by this PR. |
|
Thank you! The error is unrelated to this PR. I have never seen it before but it is related to disablement/enablement of key bindings for the FindReplaceOverlay. At first impression, it rather seems to be some issue in the according functionality of the text editor, but since that one is not "official" API and only used via reflection (just like the breadcrumb does it), there is of course no guarantee to work under every condition. Definitely something to take a look into. If no one objects to the PR itself (enabling search-as-you-type for regex mode), I would like to give it a try next week. I will then address this as a follow-up: |
11cf37b to
af5f0db
Compare
|
Thank you again for reporting the error, Jörg! I can reproduce it and have created a dedicated issue for it as it is unrelated to this PR: I have created a separate PR proposing a fix for it. |
…form#1911 Currently, the FindReplaceLogic disables the incremental mode (i.e., search-as-you-type) in case the regex search option is activated. This makes the FindReplaceOverlay, which uses search-as-you-type in all other situations, behave non-intuitively when the regex option is activated. In order to achieve consistent, user-expectable behavior of the find and replace functionality and because of lacking arguments against using search-as-you-type in regex mode, this change makes the regex search mode independent from the incremental mode of the FindReplaceLogic. In consequence, the FindReplaceOverlay always uses search-as-you-type, no matter which search options are activated. In addition, explicit test code for that exceptional behavior is removed or adapted. Contributes to eclipse-platform#2066 Contributes to eclipse-platform#2646 Fixes eclipse-platform#1911
af5f0db to
8bd6fc0
Compare


Currently, the FindReplaceLogic disables the incremental mode (i.e., search-as-you-type) in case the regex search option is activated. This makes the FindReplaceOverlay, which uses search-as-you-type in all other situations, behave non-intuitively when the regex option is activated.
In order to achieve consistent, user-expectable behavior of the find and replace functionality and because of lacking arguments against using search-as-you-type in regex mode, this change makes the regex search mode independent from the incremental mode of the FindReplaceLogic. In consequence, the FindReplaceOverlay always uses search-as-you-type, no matter which search options are activated.
In addition, explicit test code for that exceptional behavior is removed or adapted.
Contributes to #2066
Contributes to #2646
Fixes #1911
Note that this also aligns the behavior with similar functionality in other tools (like VS code).