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

Implement Kakoune's A-S: Select first and last chars #9483

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

scdailey
Copy link

@scdailey scdailey commented Jan 30, 2024

Fixes #9459

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-command Area: Commands labels Jan 30, 2024
@scdailey scdailey changed the title Select first and last chars Implement Kakoune's A-S: Select first and last chars Jan 30, 2024
@scdailey scdailey changed the title Implement Kakoune's A-S: Select first and last chars Implement Kakoune's A-S: Select first and last chars Jan 30, 2024
@kirawi
Copy link
Member

kirawi commented Jan 30, 2024

I don't think this handles zero-size selections (only when doc is completely empty) or 1-wide selections. Might want to check the size first.

@scdailey
Copy link
Author

I don't think this handles zero-size selections (only when doc is completely empty) or 1-wide selections. Might want to check the size first.

Good catch - I'll do that now

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be added to the book under selection manipulation: https://github.com/helix-editor/helix/blob/master/book/src/keymap.md#selection-manipulation

helix-term/src/commands.rs Outdated Show resolved Hide resolved
helix-term/src/commands.rs Outdated Show resolved Hide resolved
@scdailey
Copy link
Author

scdailey commented Jan 30, 2024

Okay just made the fixes. I believe that using the helpers also addressed the overflow issues that @kirawi mentioned.

helix-term/src/commands.rs Outdated Show resolved Hide resolved
book/src/keymap.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-command Area: Commands S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Kakoune's A-S
3 participants