Summary
Typing :help (bare, no topic) in both the TUI and GTK front-ends crashes vimcode.
Repro
- Launch vimcode (TUI:
cargo run; GTK: cargo run --features gtk / the GTK binary).
- From normal mode, press
: to enter command mode.
- Type
help and press Enter.
- → vimcode panics / crashes.
Both front-ends are affected, which points at shared engine code rather than a front-end renderer.
Suspected location
Engine::cmd_help in src/core/engine/buffers.rs:1582 handles :help. After building the help text it:
let buf_id = self.buffer_manager.create();
if let Some(state) = self.buffer_manager.get_mut(buf_id) {
state.buffer.content = ropey::Rope::from_str(&text);
}
self.split_window(SplitDirection::Vertical, None); // <-- likely crash path
self.active_window_mut().buffer_id = buf_id;
The crash most likely comes from split_window / active_window_mut or from rendering a freshly-created buffer that has no per-window cursor/scroll state (e.g. cursor position out of bounds, unwrap on a missing window/layout entry). :help <topic> may share the same path. Please capture the actual panic message + backtrace (RUST_BACKTRACE=1) and fix the root cause — do not just swallow the panic.
Expected behavior
:help opens the help text in a new split window (a scratch/help buffer) without crashing, matching the existing :help <topic> intent.
Acceptance (black-box test required)
Per CLAUDE.md, ship a black-box regression test that drives the running app and asserts on rendered output:
- A TUI-harness test (drive
:help + Enter through the real event → handle → render path) that asserts no panic and that the help buffer content is visible on screen.
- If feasible in the same PR, a GTK/offscreen-harness assertion as well; at minimum an engine-level test that
execute_command("help") returns without panicking and creates the help buffer + split.
Also verify :help topics, :help keys, :help commands, :help explorer, and an unknown topic (:help bogus) all behave (open buffer or set the "No help for ..." message) without crashing.
Summary
Typing
:help(bare, no topic) in both the TUI and GTK front-ends crashes vimcode.Repro
cargo run; GTK:cargo run --features gtk/ the GTK binary).:to enter command mode.helpand press Enter.Both front-ends are affected, which points at shared engine code rather than a front-end renderer.
Suspected location
Engine::cmd_helpinsrc/core/engine/buffers.rs:1582handles:help. After building the help text it:The crash most likely comes from
split_window/active_window_mutor from rendering a freshly-created buffer that has no per-window cursor/scroll state (e.g. cursor position out of bounds, unwrap on a missing window/layout entry).:help <topic>may share the same path. Please capture the actual panic message + backtrace (RUST_BACKTRACE=1) and fix the root cause — do not just swallow the panic.Expected behavior
:helpopens the help text in a new split window (a scratch/help buffer) without crashing, matching the existing:help <topic>intent.Acceptance (black-box test required)
Per CLAUDE.md, ship a black-box regression test that drives the running app and asserts on rendered output:
:help+ Enter through the realevent → handle → renderpath) that asserts no panic and that the help buffer content is visible on screen.execute_command("help")returns without panicking and creates the help buffer + split.Also verify
:help topics,:help keys,:help commands,:help explorer, and an unknown topic (:help bogus) all behave (open buffer or set the "No help for ..." message) without crashing.