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 gf on a document with accented characters, panics if the cursor is near the end of a document.
Reproduction Steps
I tried this:
printf '\xc3\xa1' | hx
pressed gf
I expected this to happen:
It should not panic
Instead, this happened:
thread 'main' panicked at /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/ropey-1.6.1/src/rope.rs:952:36:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: core::option::unwrap_failed
4: helix_term::commands::goto_file_impl
5: helix_term::ui::editor::EditorView::handle_keymap_event::{{closure}}
6: helix_term::ui::editor::EditorView::handle_keymap_event
7: <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::handle_event
8: helix_term::compositor::Compositor::handle_event
9: hx::main_impl::{{closure}}
10: tokio::runtime::park::CachedParkThread::block_on
11: tokio::runtime::context::runtime::enter_runtime
12: tokio::runtime::runtime::Runtime::block_on
13: hx::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Can confirm this bug on arch linux for 25.01.1 as well. In a document containing only the character "á", using "gf" crashes with
thread 'main' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ropey-1.6.1/src/rope.rs:952:36:
called `Option::unwrap()` on a `None` value
For what it's worth, on my slightly-outdated from-source build, I cannot reproduce with the otherwise same environment as in the original report (Darwin, kitty), so this might've been fixed somewhere in between the latest release and my build (helix 25.01.1 (13b2dc3)).
Summary
When using
gf
on a document with accented characters, panics if the cursor is near the end of a document.Reproduction Steps
I tried this:
printf '\xc3\xa1' | hx
gf
I expected this to happen:
It should not panic
Instead, this happened:
Helix log
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
Kitty
Installation Method
brew
Helix Version
helix 25.01.1 (e7ac2fc)
The text was updated successfully, but these errors were encountered: