Skip to main content

dispatch_input

Function dispatch_input 

Source
pub fn dispatch_input<H: Host>(
    editor: &mut Editor<Buffer, H>,
    input: Input,
) -> bool
Expand description

Drive the vim FSM with one hjkl_engine::Input.

This is the Phase 6.6 entry-point that decouples callers from the engine’s internal FSM. Returns true if the engine consumed the keystroke.

§Migration guide

Replace editor.step_input(input) with hjkl_vim::dispatch_input(&mut editor, input). The Editor::step_input method is deprecated; remove it in a later release.

§Phase 6.6c / 6.6d / 6.6e

Search-prompt mode (6.6c) is intercepted here before begin_step because it is a true short-circuit (no prelude/epilogue needed).

Insert mode (6.6d) is hosted in hjkl-vim::insert::step_insert.

Normal / Visual / VisualLine / VisualBlock / operator-pending modes (6.6e) are hosted in hjkl-vim::normal::step_normal. Both are wrapped with begin_step / end_step so macro recording, viewport scrolling, and current_mode sync all fire correctly.

The deprecated Editor::step_input_raw shim path is retained for back-compat until Phase 6.6h.