Skip to content

Prevent cursor from reaching the last empty line #92

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

badranX
Copy link
Contributor

@badranX badranX commented May 11, 2025

This is an attempt at preventing the cursor from reaching the last empty line. The abroach is to do a simple test if the rule is violated and correct it. Another abroach is to go through upstream code and add checks whenever a violation is possible.

I don't think this is an important feature, so not sure if it's worth merging. However, currently, search_selection_detect_word_boundaries can panic on that line, which is solved in upstream.

Note: I might be missing some cases of reaching the last-empty line (except for empty files). I have little experience with helix. Feel free to report if you find any.

Note: maybe a refactoring is needed to put all helix after/before command "hooks" under a test like EvilCommands::is_enabled.

Edit: Avoiding the search_selection_detect_word_boundaries bug, would allow for */# multi-keyword search support in #79 . It's not a Vim feature but maybe evil-helix can aim to be a superset, when there's no conflict.

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.

1 participant