1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! Pluggable input-discipline state (#265 G3 / #267).
//!
//! The engine owns the editing *core* (buffer, undo, registers, marks,
//! search, viewport) but is agnostic about the *keybinding discipline* (vim,
//! vscode, future helix/emacs). Each discipline's FSM state lives in its own
//! crate (e.g. `hjkl-vim`'s `VimState`) and is stored on the [`Editor`] through
//! this type-erased slot — the engine never names the concrete state type.
//!
//! The trait is intentionally **minimal**: the engine only asks a discipline
//! for its [`CoarseMode`] (status badge / cursor shape) plus an `Any` upcast.
//! All discipline-specific behavior lives behind that downcast in the
//! discipline crate (e.g. `hjkl_vim::vim_state`), never on this trait.
//!
//! [`Editor`]: crate::Editor
use crateCoarseMode;
/// Discipline-private FSM state, stored type-erased on the [`Editor`].
///
/// [`Editor`]: crate::Editor
/// Default discipline for an [`Editor`] that has not had a real discipline
/// installed: no FSM, always reports [`CoarseMode::Normal`]. Editors that
/// receive vim/vscode/etc. input install their discipline at construction
/// (e.g. `hjkl_vim::install_vim_discipline`).
///
/// [`Editor`]: crate::Editor
;