Fix launcher search: key_name returned code-unit numbers instead of characters

String indexing yields a UTF-16 code unit, so 'a' became "97" and the launcher
rejected it. Convert to Char first; the input test now types into the search.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-24 20:21:46 -08:00
1 parent 9e7687bea8
commit 57d5376211
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -105,6 +105,12 @@ test "host input reaches the focused client and the launcher popup opens" {
comp.handle_input(@nested.InputEvent::Key(30U, true), 23U)
let after = drain_msgs(c)
assert_false(has_msg(after, kbd_id, 3U)) // swallowed by the launcher
// Typing fills the search field: evdev 20 = t, 18 = e (key 30 = a was typed above).
comp.handle_input(@nested.InputEvent::Key(20U, true), 26U)
comp.handle_input(@nested.InputEvent::Key(18U, true), 27U)
assert_eq(comp.shell.launcher_state.query, "ate")
comp.handle_input(@nested.InputEvent::Key(14U, true), 28U)
assert_eq(comp.shell.launcher_state.query, "at")
// Off the shell and off any window: default arrow.
comp.handle_input(@nested.InputEvent::PointerMove(1270.0, 5.0), 25U)
assert_eq(comp.desired_cursor(), 1U)