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 /// Emitted by `PendingState::AfterG` when the user completes `g<x>`. The
19 /// host calls `Editor::after_g(ch, count)`.
20 AfterGChord {
21 ch: char,
22 count: usize,
23 },
24 // Future variants land in chunks 2cā2e: GotoMark, etc.
25}