Skip to content

Match in visual use head not anchor - #1805

Merged
archseer merged 1 commit into
helix-editor:masterfrom
pickfire:match-anchor
Mar 14, 2022
Merged

Match in visual use head not anchor#1805
archseer merged 1 commit into
helix-editor:masterfrom
pickfire:match-anchor

Conversation

@pickfire

@pickfire pickfire commented Mar 13, 2022

Copy link
Copy Markdown
Contributor

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