Open
Description
Summary
Panic when trying to perform a change edit.
Reproduction Steps
Note: I won't be able to provide the file, but the file was HTML w/ escaped newlines by replacing \r
w/ \\r
and \n
with \\n
I tried this:
hx file
%s
\\\\r\\\\n
c<ret>
I expected this to happen:
Undoes escaping
Instead, this happened:
thread 'main' panicked at /home/sumire/Desktop/helix/helix-core/src/transaction.rs:618:13:
assertion failed: last <= from
stack backtrace:
0: rust_begin_unwind
at /rustc/a730edcd67c7cb29d4458e170d4eb290387c27c3/library/std/src/panicking.rs:695:5
1: core::panicking::panic_fmt
at /rustc/a730edcd67c7cb29d4458e170d4eb290387c27c3/library/core/src/panicking.rs:75:14
2: core::panicking::panic
at /rustc/a730edcd67c7cb29d4458e170d4eb290387c27c3/library/core/src/panicking.rs:145:5
3: helix_core::transaction::Transaction::change
at ./helix-core/src/transaction.rs:618:13
4: helix_core::transaction::Transaction::change_by_selection
at ./helix-core/src/transaction.rs:688:9
5: helix_term::commands::insert::insert_newline
at ./helix-term/src/commands.rs:4148:31
6: helix_term::commands::MappableCommand::execute
at ./helix-term/src/commands.rs:263:41
7: helix_term::ui::editor::EditorView::handle_keymap_event::{{closure}}
at ./helix-term/src/ui/editor.rs:893:13
8: helix_term::ui::editor::EditorView::handle_keymap_event
at ./helix-term/src/ui/editor.rs:919:17
9: helix_term::ui::editor::EditorView::insert_mode
at ./helix-term/src/ui/editor.rs:933:34
10: <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::handle_event
at ./helix-term/src/ui/editor.rs:1467:33
11: helix_term::compositor::Compositor::handle_event
at ./helix-term/src/compositor.rs:155:19
12: helix_term::application::Application::handle_terminal_events::{{closure}}
at ./helix-term/src/application.rs:659:22
13: helix_term::application::Application::event_loop_until_idle::{{closure}}
at ./helix-term/src/application.rs:332:56
14: helix_term::application::Application::event_loop::{{closure}}
at ./helix-term/src/application.rs:306:58
15: helix_term::application::Application::run::{{closure}}
at ./helix-term/src/application.rs:1139:39
16: hx::main_impl::{{closure}}
at ./helix-term/src/main.rs:153:54
17: <core::pin::Pin<P> as core::future::future::Future>::poll
at /home/sumire/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:124:9
18: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/park.rs:284:63
19: tokio::runtime::coop::with_budget
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/coop.rs:107:5
20: tokio::runtime::coop::budget
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/coop.rs:73:5
21: tokio::runtime::park::CachedParkThread::block_on
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/park.rs:284:31
22: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/context/blocking.rs:66:9
23: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
24: tokio::runtime::context::runtime::enter_runtime
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/context/runtime.rs:65:16
25: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
26: tokio::runtime::runtime::Runtime::block_on_inner
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/runtime.rs:370:45
27: tokio::runtime::runtime::Runtime::block_on
at /home/sumire/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/runtime.rs:340:13
28: hx::main_impl
at ./helix-term/src/main.rs:155:5
29: hx::main
at ./helix-term/src/main.rs:37:21
30: core::ops::function::FnOnce::call_once
at /home/sumire/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Helix log
N/a
Platform
Linux
Terminal Emulator
Kitty
Installation Method
source
Helix Version
helix 25.01.1 (0efa820)