Skip to content

Helix crash on Ctrl-o #2489

Closed
Closed
@Zoybean

Description

@Zoybean

Summary

When pressing ctrl-o after deleting selection contents, helix crashes.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Char index out of bounds: char index 1794223, Rope/RopeSlice char length 1776214', C:\Users\runneradmin\.cargo\registry\src\g.yxqyang.asia-1ecc6299db9ec823\ropey-1.4.1\src\slice.rs:349:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Reproduction Steps

I tried this:

  1. select the whole file
  2. select some subset of the file, and delete that subset
  3. press ctrl-o

I expected this to happen:

  • Either an error message, or the previously selected region of the file is reselected

Instead, this happened:

  • helix crashed

Helix log

No log available

Platform

Windows 10

Terminal Emulator

ConEmu 160914 [64] {Stable}

Helix Version

helix 22.03 (d4e45fd)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions