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

Crash when deleting the last line and undoing it. #4869

Closed
phynalle opened this issue Nov 23, 2022 · 0 comments · Fixed by #4865
Closed

Crash when deleting the last line and undoing it. #4869

phynalle opened this issue Nov 23, 2022 · 0 comments · Fixed by #4865
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@phynalle
Copy link
Contributor

phynalle commented Nov 23, 2022

Summary

Hello! I'm newbie to helix.
I'm working on my toy project with helix to practice it, but it is sometimes and suddenly crashed in a certain situation.
And I figured out how to reproduce it.

Reproduction Steps

  1. Delete line. (x + d)
  2. Go to last line (g + e)
  3. Undo (u)
  4. Try 1~3 again.

I minimized it more like this.

  1. hx
  2. type d + ge + u
  3. type d + ge + u, again
  4. CRASH!

the error message is below:

thread 'main' panicked at 'Position 2 is out of range for changeset len 0!', helix-core\src\transaction.rs:397:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Actually, the minimized steps don't need to go last line.
Typing dudu just makes the helix crash.

Helix log

I tried to log after clearing it. but no words are written.

Platform

Windows

Terminal Emulator

Windows Terminal

Helix Version

helix 22.08.1 (590a628)

@phynalle phynalle added the C-bug Category: This is a bug label Nov 23, 2022
@phynalle phynalle changed the title Crash when when deleting the last line and undoing it. Crash when deleting the last line and undoing it. Nov 23, 2022
@the-mikedavis the-mikedavis linked a pull request Nov 23, 2022 that will close this issue
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Nov 23, 2022
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