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

Assertion fails when using Alt-J on last line #5423

Closed
howard36 opened this issue Jan 6, 2023 · 0 comments · Fixed by #5579
Closed

Assertion fails when using Alt-J on last line #5423

howard36 opened this issue Jan 6, 2023 · 0 comments · Fixed by #5579
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@howard36
Copy link
Contributor

howard36 commented Jan 6, 2023

Summary

When the cursor is on the last line of a file (the very last line, which is always empty and has ~ as the line number) and Alt-J is pressed, Helix panics with the following error:

thread 'main' panicked at 'assertion failed: !ranges.is_empty()', helix-core/src/selection.rs:527:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Reproduction Steps

I tried this:

  1. hx
  2. j
  3. Alt-J

I expected this to happen:
No changes or edits.

Instead, this happened:
Helix panics with error

thread 'main' panicked at 'assertion failed: !ranges.is_empty()', helix-core/src/selection.rs:527:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Asciinema recording: https://asciinema.org/a/DMVeqQHNtvFWGxBvR7YrK7GMZ

Helix log

No new messages were logged in ~/.cache/helix/helix.log while performing the above steps.

Platform

Linux

Terminal Emulator

kitty 0.26.5

Helix Version

helix 22.12

@howard36 howard36 added the C-bug Category: This is a bug label Jan 6, 2023
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Jan 6, 2023
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 C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants