Skip to content
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

Match in visual use head not anchor #1805

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

pickfire
Copy link
Contributor

@pickfire pickfire commented Mar 13, 2022

Currently match is finding the match based on the anchor rather than the
head (cursor) so this behavior is rather unexpected when user is doing
a match but a different item was matched instead when the selection is
more than one character.

Example

#(let hello = {|)#
};

When mm

Before (it will match more than just the cursor matching char)

#(let hello = {
};|)#

After (it finds matching character based on the cursor)

#(let hello = {
}|)#;

There is one change I would like to do here but did not since it brings in more change, which is that mm will select everything within by default, rather than needing to do v. Maybe need to confirm with @sudormrfbin for that.

Currently match is finding the match based on the anchor rather than the
head (cursor) so this behavior is rather unexpected when user is doing
a match but a different item was matched instead when the selection is
more than one character.
@pickfire pickfire requested a review from sudormrfbin March 13, 2022 14:25
@archseer archseer merged commit 3d76fa0 into helix-editor:master Mar 14, 2022
@pickfire pickfire deleted the match-anchor branch March 14, 2022 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants