Skip to content

fix(tui): reset chord indicator on timeout + complete yank-mode hint - #20

Merged
TimelordUK merged 1 commit into
mainfrom
fix/chord-timeout-reset-and-yank-hint
Jun 7, 2026
Merged

fix(tui): reset chord indicator on timeout + complete yank-mode hint#20
TimelordUK merged 1 commit into
mainfrom
fix/chord-timeout-reset-and-yank-hint

Conversation

@TimelordUK

Copy link
Copy Markdown
Owner

The yank chord (e.g. yq = yank query) only resolves if the second key is pressed within the 1s chord window. Two papercuts made this confusing:

  • The on-screen "Yank mode" hint omitted v and q, so it wasn't clear which key yanked the query. Now lists y/r=row, c=column, a=all, v=cell, q=query, ESC=cancel.

  • The chord timeout was only evaluated when the next key arrived, so a dangling chord (y with no follow-up) left the hint on screen forever, and a key pressed after the timeout left a stale indicator. Added KeyChordHandler::clear_if_timed_out(), called from the idle loop to cancel a lapsed chord and refresh, and clear the hint on the SingleKey path. The "Yank mode" hint now visibly resets ~1s after y.

The yank chord (e.g. `yq` = yank query) only resolves if the second key
is pressed within the 1s chord window. Two papercuts made this confusing:

- The on-screen "Yank mode" hint omitted `v` and `q`, so it wasn't clear
  which key yanked the query. Now lists y/r=row, c=column, a=all, v=cell,
  q=query, ESC=cancel.

- The chord timeout was only evaluated when the next key arrived, so a
  dangling chord (`y` with no follow-up) left the hint on screen forever,
  and a key pressed after the timeout left a stale indicator. Added
  KeyChordHandler::clear_if_timed_out(), called from the idle loop to
  cancel a lapsed chord and refresh, and clear the hint on the SingleKey
  path. The "Yank mode" hint now visibly resets ~1s after `y`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TimelordUK
TimelordUK merged commit 807bfab into main Jun 7, 2026
3 checks passed
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