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
If you reload a file while your cursor is out-of-bounds of the reloaded file, a panic occurs.
Backtrace:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Line index out of bounds: line index 4569, Rope/RopeSlice line count 2923', /build/helix-22.03-vendor.tar.gz/ropey/src/slice.rs:424:41
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: ropey::slice::RopeSlice::line_to_byte
4: helix_term::ui::editor::EditorView::doc_syntax_highlights
5: helix_term::ui::editor::EditorView::render_view
6: <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::render
7: helix_term::compositor::Compositor::render
8: helix_term::application::Application::handle_terminal_events
9: helix_term::application::Application::event_loop::{{closure}}
10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
11: tokio::park::thread::CachedParkThread::block_on
12: tokio::runtime::thread_pool::ThreadPool::block_on
13: tokio::runtime::Runtime::block_on
14: hx::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Reproduction Steps
Open a file and go to line N (N must be at least some number. It works for me at ~200).
Externally edit the file so that it is much shorter than N
What this look like, in case anyone is just wondering and don't want to cargo run, is to bring the end of the file to top of the editor view.
I think for better user experience we might want to scroll back a bit further. What do you guys think?
Summary
If you reload a file while your cursor is out-of-bounds of the reloaded file, a panic occurs.
Backtrace:
Reproduction Steps
:reload
the file.Helix log
There is no relevant log information.
Platform
Linux
Terminal Emulator
gnome-terminal
Helix Version
helix 22.03 (d4e45fd)
The text was updated successfully, but these errors were encountered: