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
Ctrl-O panics if target position is out of buffer bounds
Reproduction Steps
open new file
create content:
1234567890
from normal mode, type sequence: ggglCtrl+SghdddCtrl+O
observe panic message
Helix log
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Char index out of bounds: char index 12, Rope/RopeSlice char length 9', /home/sh/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ropey-1.5.0/src/slice.rs:349:41
stack backtrace:
0: rust_begin_unwind
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
2: core::result::unwrap_failed
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/result.rs:1785:5
3: ropey::slice::RopeSlice::char_to_byte
4: helix_core::graphemes::nth_prev_grapheme_boundary
5: helix_core::selection::Range::grapheme_aligned
6: helix_core::selection::Selection::ensure_invariants
7: helix_view::document::Document::set_selection
8: helix_term::commands::jump_backward
9: helix_term::ui::editor::EditorView::handle_keymap_event::{{closure}}
10: helix_term::ui::editor::EditorView::handle_keymap_event
11: <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::handle_event
12: helix_term::compositor::Compositor::handle_event
13: helix_term::application::Application::handle_terminal_events
14: helix_term::application::Application::event_loop_until_idle::{{closure}}
15: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
16: std::thread::local::LocalKey<T>::with
17: tokio::park::thread::CachedParkThread::block_on
18: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
19: tokio::runtime::Runtime::block_on
20: hx::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Summary
Ctrl-O panics if target position is out of buffer bounds
Reproduction Steps
gggl
Ctrl+S
ghddd
Ctrl+O
Helix log
Platform
Linux
Terminal Emulator
alacritty 0.10.1 ()
Helix Version
helix 22.08.1 (43b31f7)
The text was updated successfully, but these errors were encountered: