Skip to content

v0.4.4 — input parser fixes

Choose a tag to compare

@thatsme thatsme released this 27 Jul 10:45

v0.4.4 — input parser fixes

Two bugs reachable only from real terminal bytes. The v0.4.3 suite passed
over both: widget tests feed synthesised key events straight to apply_key/_,
so nothing exercised the sequences a terminal actually sends. The new tests
assert on bytes.

Fixed:

  • Alt-Backspace now reaches the widgets that bind it. Terminals send the
    chord as ESC + DEL (0x7F) or BS (0x08); neither byte is inside the
    printable range the ESC-prefix clause matched, so backward-kill-word
    silently degraded to deleting one grapheme. Alt-B / Alt-F were never
    affected — printable bytes took the ESC-prefix path, which is why word
    motion worked while the word kill did not.
  • A bare ESC before an unhandled byte is the Escape key, not codepoint 27.
    0x1B is valid single-byte UTF-8, so an unrecognised ESC sequence arrived
    as {:key, {:char, 27}, []} — printable text for a keypress with its own
    atom. Apps matching {:key, :escape, []} missed it, and a focused
    text_input would have inserted it.

Also records the v0.5 restructure: that milestone closes on the widget set
alone, so richer Sub kinds and box(focus_proxy:) move to v0.6 and pre-1.0
hardening shifts to v0.7.

Full notes in CHANGELOG.md.