Skip to main content

Module text_input

Module text_input 

Source
Expand description

A one-line editor. Every text field in mach is built from it — the title, the due date, category names, the command line, the search box, and each block of a task’s body. Cursor and selection indices are Unicode grapheme clusters; display geometry is still measured in cells.

Selection follows macOS: Shift extends, Option jumps by word, and Shift+Option+W selects the word under the cursor.

Structs§

TextInput
View
What TextInput::visible hands the UI: text, caret column, and an optional selection span in display columns within that text.
WrappedLine
One visual row of a soft-wrapped field.
WrappedView
Soft-wrapped layout for body / description painting.

Functions§

wrap_breaks
Soft-wrap graphemes into (start, end) ranges of at most width display columns. Prefers breaking after a space; otherwise hard-breaks.