Skip to content

fix(tui): keep typing while the completion popup has key capture - #17

Merged
jkyberneees merged 1 commit into
mainfrom
fix/completion-popup-typing
Jul 27, 2026
Merged

fix(tui): keep typing while the completion popup has key capture#17
jkyberneees merged 1 commit into
mainfrom
fix/completion-popup-typing

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Problem

Typing "/" opened the command-completion popup, after which no further characters could be typed — every keystroke that wasn't a popup navigation key was silently swallowed by handleACKey's return m, nil fallthrough.

Fix

Non-navigation keys now fall through to the textarea and re-sync the popup (same path as normal typing):

  • typing narrows the filter (//h → only /help)
  • backspace widens it; a space ends command completion as before
  • ctrl+c quits while the popup is open instead of being dropped

Tests

  • New regression test TestCommandPopupKeepsTyping (confirmed red before the fix: input stayed "/" after typing "h")
  • Full checklist green: make fmt · make vet · make lint (0 issues) · make test (race, all packages)

handleACKey swallowed every key that wasn't a popup navigation key, so
once "/" opened the command popup no further input could be typed.
Plain keys now fall through to the textarea and re-sync the popup:
typing narrows the filter, backspace widens it, a space ends command
completion. ctrl+c also quits while the popup is open instead of being
dropped.
@jkyberneees
jkyberneees merged commit 9615faf into main Jul 27, 2026
5 checks passed
@jkyberneees
jkyberneees deleted the fix/completion-popup-typing branch July 27, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant