helix icon indicating copy to clipboard operation
helix copied to clipboard

Crash on delete in vertically-stacked split-screen

Open aral opened this issue 3 years ago • 2 comments

Summary

  • Had same document open in top and bottom windows.
  • Deleted several lines of text from the top screen.

Error

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Line index out of bounds: line index 52, Rope/RopeSlice line count 49', /var/home/aral/.cargo/registry/src/github.com-1ecc6299db9ec823/ropey-1.5.0/src/slice.rs:424:41

Reproduction Steps

Not sure how to reproduce at the moment.

Helix log

Nothing relevant in the Helix logs.

Platform

Linux (Fedora Silverblue 37 Beta)

Terminal Emulator

Black Box

Helix Version

helix 22.08.1 (385ccdfc)

aral avatar Sep 26 '22 11:09 aral

This can be reproduced like this:

  • open helix
  • insert a few newlines (more than the window's height)
  • split the window (vertically or horizontally, doesn't matter)
  • in the new split jump to the start (gg)
  • delete a few lines
  • the panic occurs when the ~ end of document character goes off screen

CptPotato avatar Sep 26 '22 12:09 CptPotato

I hit this one a few times a day now, same error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Line index out of bounds: line index 46, Rope/RopeSlice line count 43', $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/ropey-1.5.0/src/slice.rs:424:41

Built at HEAD this morning

bcspragu avatar Oct 21 '22 14:10 bcspragu