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

Fix x behavior on empty lines #4847

Closed
wants to merge 1 commit into from
Closed

Fix x behavior on empty lines #4847

wants to merge 1 commit into from

Conversation

dpc
Copy link
Contributor

@dpc dpc commented Nov 22, 2022

This is to address my personal issue with #356.

I'm not sure if this is an ideal implementation, or will it get merged, but was easy enough and it should be easy for me to use a personal fork, just like I used to for kakoune: https://github.com/dpc/kakoune-dpc/

@kirawi kirawi added A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. R-breaking-change This PR is a breaking change for some behavior labels Nov 22, 2022
@@ -54,6 +54,9 @@ pub struct Range {
/// The head of the range, moved when extending.
pub head: usize,
pub horiz: Option<u32>,
/// True if range is intended to contain whole lines (e.g. after `line_extend_below`).
/// Useful to prevent first `line_extend_below` on an empty line selecting the next line.
pub line_mode: bool,
Copy link
Member

Choose a reason for hiding this comment

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

This should be a field on the Selection, not Range?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea. :) . Seem to work OK for me, AFAICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements R-breaking-change This PR is a breaking change for some behavior S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants