kitty/kittens/hints
gogongxt 56f276580f Fix hints kitten breaking multi-byte UTF-8 characters when overlaying hint labels
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>
2026-05-13 17:09:42 +08:00
..
__init__.py
main.go Fix hints kitten breaking multi-byte UTF-8 characters when overlaying hint labels 2026-05-13 17:09:42 +08:00
main.py Highlight full extent of hint matches, not just the prefix label 2026-03-24 11:23:30 -04:00
marks.go hints: Fix trailing punctuation being included in detected URLs 2026-04-07 22:57:36 -07:00
marks_test.go hints: Fix trailing punctuation being included in detected URLs 2026-04-07 22:57:36 -07:00