Skip to main content

hjkl_vim/
cmd.rs

1/// Controller commands the host engine implements. hjkl-vim never mutates
2/// the editor directly — it emits a command and the host (apps/hjkl) calls
3/// the corresponding `Editor` method.
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub enum EngineCmd {
6    ReplaceChar {
7        ch: char,
8        count: usize,
9    },
10    /// Emitted by `PendingState::Find` when the user completes `f<x>` / `F<x>`
11    /// / `t<x>` / `T<x>`. The host calls `Editor::find_char`.
12    FindChar {
13        ch: char,
14        forward: bool,
15        till: bool,
16        count: usize,
17    },
18    // Future variants land in chunks 2c–2e: GotoMark, etc.
19}