Skip to main content

Module edit

Module edit 

Source
Expand description

a vi line editor for the composer. insert and normal sub-modes, motions, operators, registers and history — the same muscle memory as everywhere else, rather than a handful of emacs control chords.

text is held as Vec<char> and the cursor is a CHAR index. chat is full of emoji and CJK, and byte offsets would put motions and deletes half-way through a glyph; at composer length the extra allocation is irrelevant.

no rendering and no app state here — main.rs asks what a key did and draws the result, which is what lets every motion below be tested directly.

Structs§

Line

Enums§

Act
what the caller should do after a key.
Mode

Constants§

HISTORY_CAP
sent lines kept (in memory and on disk).