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

Helix crash with :reflow on some file #4775

Closed
nakrule opened this issue Nov 16, 2022 · 3 comments
Closed

Helix crash with :reflow on some file #4775

nakrule opened this issue Nov 16, 2022 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@nakrule
Copy link

nakrule commented Nov 16, 2022

Summary

Helix crash when I use :reflow 100 on a whole markdown file (all lines selected in visual mode).

Error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Line index out of bounds: line index 50, Rope/RopeSlice line count 42', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/ropey-1.5.0/src/slice.rs:424:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This does not happend with every files I tried. I included a download link to one that will reproduce the bug.

Reproduction Steps

I tried this:

  1. Download the following file: https://pastebin.com/e3Ryjrrw
  2. Open the file with Helix
  3. Select all lines with gg and then vge
  4. Use :reflow 100
  5. helix crash

Helix log

No response

Platform

macOS

Terminal Emulator

iTerm

Helix Version

helix 22.08.1 (66276ce)

@nakrule nakrule added the C-bug Category: This is a bug label Nov 16, 2022
@David-Else
Copy link
Contributor

Your file works on the master branch using Linux, could you try and compile from master and see if it is fixed for you?

@zen3ger
Copy link
Contributor

zen3ger commented Nov 19, 2022

Not the author, but I did the repro tests on helix 22.08.1 (0e23e4f8) and I did not observed the crash.

@the-mikedavis
Copy link
Member

This was fixed in #3733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants