-
Notifications
You must be signed in to change notification settings - Fork 757
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
Fix several minor search bugs relating to incsearch highlighting and Visual mode #1080
Draft
citizenmatt
wants to merge
25
commits into
JetBrains:master
Choose a base branch
from
citizenmatt:bugfix/incsearch-and-visual
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fix several minor search bugs relating to incsearch highlighting and Visual mode #1080
citizenmatt
wants to merge
25
commits into
JetBrains:master
from
citizenmatt:bugfix/incsearch-and-visual
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
Wanting to add `ReturnTo.SELECT` would be very tricky, as we would have to recreate the mode, but have no details about the selection type.
From Select mode, enters Visual for a single command
Fixes VIM-3618
Fixes VIM-3042
As a by-product, this also fixes an off-by-one error where incsearch would effectively treat all Visual searches as exclusive
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 fixes a number of bugs related to
'incsearch'
highlighting while searching in Visual mode, e.g.v/foo
'incsearch'
would not correctly update an empty selection, when'selection'
was set to "exclusive". So something likeve/foo
would work butv/foo
would not update the selection. The selection would be correctly set when completing the search with<CR>
/foo
to/faa
'incsearch'
highlighting when'nohlsearch'
is set and Visual mode is active. Normally,'incsearch'
highlighting is shown for the current match, even when'hlsearch'
is disabled, but it's not shown if Visual mode is active - the selection is enough'incsearch'
needs to move the caret for a Command-line command, rather than a search. E.g. something likeve:<C-U>normal 3j
should not maintain the Visual selection, butve/foo
shouldIt also removes some obsolete tests using the no longer used
'usenewregex'
option, and splits up the search related tests intoSearchGroupTest.kt
,IncsearchTests.kt
,SearchHighlightsTest.kt
, etc.This PR depends on the
Mode
refactoring in #1078 and includes all of those commits. To make it easier for me to manage, it's also based on #1079. Once these PRs are merged, I will rebase and force push and mark this PR as no longer draft. Here are the lists of commits for this PR: 5275057...f31fde9