You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using vnew to vertically split the screen, creating a new window, then searching for something in that window with / which causes matching text to be selected, not pressing enter, and then switching focus to the other window and pressing backspace, Helix panics.
Reproduction Steps
I tried this:
hx
:vnew
:tutor (I've verified it works with any text, but just using tutor is easier to follow for this report)
/align (Search for text that appears in the window, it can be anything so long as it causes text to be selected. Note that I'm not pressing enter).
[left mouse button click on the empty original window on the left]
backspace
I expected this to happen:
A character is removed from the searched-for text.
Instead, this happened:
Helix panics with this:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Byte index out of bounds: byte index 19267, Rope/RopeSlice byte length 1', /build/helix-4G9og3/helix-23.05/vendor/ropey/src/slice.rs:324:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Helix log
~/.cache/helix/helix.log
2023-08-30T16:13:11.844 helix_view::clipboard [DEBUG] Using xclip to interact with the system and selection (primary) clipboard
2023-08-30T16:13:11.845 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 149.191µs)
2023-08-30T16:13:11.845 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:12.246 helix_term::application [DEBUG] received editor event: IdleTimer
2023-08-30T16:13:13.881 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:14.282 helix_term::application [DEBUG] received editor event: IdleTimer
2023-08-30T16:13:14.512 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:14.670 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:14.773 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:14.912 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:15.917 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:15.917 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:16.327 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:16.327 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:16.596 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:16.596 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:16.728 helix_term::application [DEBUG] received editor event: IdleTimer
2023-08-30T16:13:16.774 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:16.774 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:16.885 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:16.885 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:17.057 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:17.057 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:17.155 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:17.155 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:17.684 helix_vcs [INFO] Error {
context: "failed to open git repo",
source: Discover(
NoGitRepository {
path: "/var/lib/helix/runtime",
},
),
}
2023-08-30T16:13:17.684 helix_vcs [INFO] failed to open diff base for /var/lib/helix/runtime/tutor
2023-08-30T16:13:17.684 helix_vcs [INFO] Error {
context: "failed to open git repo",
source: Discover(
NoGitRepository {
path: "/var/lib/helix/runtime",
},
),
}
2023-08-30T16:13:17.684 helix_vcs [INFO] failed to obtain current head name for /var/lib/helix/runtime/tutor
2023-08-30T16:13:17.684 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2023-08-30T16:13:17.685 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:17.685 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:18.758 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:18.758 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:18.969 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:18.969 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:19.159 helix_term::application [DEBUG] received editor event: IdleTimer
2023-08-30T16:13:19.229 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:19.229 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:19.306 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:19.306 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:19.529 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:19.529 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:19.605 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:19.605 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:20.724 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-30T16:13:20.724 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2023-08-30T16:13:21.305 helix_term::application [DEBUG] received editor event: IdleTimer
Summary
When using
vnew
to vertically split the screen, creating a new window, then searching for something in that window with/
which causes matching text to be selected, not pressing enter, and then switching focus to the other window and pressing backspace, Helix panics.Reproduction Steps
I tried this:
hx
:vnew
:tutor
(I've verified it works with any text, but just using tutor is easier to follow for this report)/align
(Search for text that appears in the window, it can be anything so long as it causes text to be selected. Note that I'm not pressingenter
).[left mouse button click on the empty original window on the left]
backspace
I expected this to happen:
A character is removed from the searched-for text.
Instead, this happened:
Helix panics with this:
Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
alacritty 0.12.2
Helix Version
helix 23.05 (7f5940b)
The text was updated successfully, but these errors were encountered: