mirror of
https://github.com/brazilofmux/tinymux
synced 2026-08-13 00:23:11 -04:00
Move all input editing logic (buffer management, grapheme cluster navigation, reflow/wrapping, cursor movement, history) from both client/tf and client/console terminal.cpp into a shared InputEditor class. Both terminal backends now delegate to the editor and handle only rendering. Key features of InputEditor: - Multi-line wrapping: grows to 3 rows and shrinks back - Grapheme-cluster-aware operations via co_cluster_advance() - CJK/emoji display-width awareness via co_console_width() - Up/Down moves within visual lines, history at edges - Home/End = visual line boundaries; Ctrl+Home/End = buffer boundaries - Goal column preservation on vertical movement - Per-context input history Also adds CTRL_HOME, CTRL_END, CTRL_UP, CTRL_DOWN key codes to the tf client's Key enum and CSI dispatch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| input_editor.cpp | ||
| input_editor.h | ||