In highlight_mark(), mark_text was sliced using byte-based indexing
(mark_text[:len(hint)] and mark_text[len(hint):]). Since len(hint)
equals the rune count (hint is always ASCII), but len(mark_text) is a
byte count, this could slice in the middle of a multi-byte UTF-8
sequence (e.g. CJK characters), producing an invalid byte sequence
rendered as the Unicode replacement character (�).
Fix by converting mark_text to []rune first, then slicing at rune
boundaries. The hint is ASCII so len(hint) == rune count, requiring
no conversion on the hint side.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add --hints-text-background-color option (default: auto) that can apply
a background color to the matched text after the hint label. This makes
it more clear exactly which text each hint covers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
We now buffer the key events until the kitten tells us it is ready.
Without this the key presses are delivered to the underlying window
as the kitten's overlay window was not being focused until the kitten
set the ready message.
Fixes#7089