mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-05 19:56:11 +00:00
fix(keyboard): count preview line breaks in codepoints, mark caps-lock
The text preview was the last part of the keyboard still working in bytes rather than codepoints. cpl is how many characters physically fit on a line, so dividing byte offsets by it counted every 2-byte Cyrillic/Greek/ accented character as two: lines held half the text they had room for, and a break could land inside a codepoint. Both display drivers are permanently single-font, so translateUTF8ToBlocks() passes UTF-8 straight through -- the truncated sequence reached print() and drew as garbage on both sides of the break. Line boundaries now walk the buffer with the same kbUtf8*() helpers insertion/backspace/T9 already use, and the per-line buffers are sized for a full line of 2-byte characters. Caps-lock also gets an underline on the shift key: it sets caps too, so the highlight alone made a one-shot Shift and a held lock indistinguishable despite capitalising one letter vs. every following one. Drops UITask::applyFont() -- setSingleFont() is a no-op on both drivers since they were pinned to misc-fixed, so it did nothing, and use_lemon_font has had no Settings row for a while. The pref itself stays: it's part of the on-disk layout. Retires the matching stale rationale on scriptHint(). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -460,7 +460,6 @@ public:
|
||||
// (some used to leave the flag set, relying on onShow() to reset it) and keeps
|
||||
// the "did we touch flash?" answer in one place. Returns whether it saved.
|
||||
bool savePrefsIfDirty(bool& dirty);
|
||||
void applyFont();
|
||||
void applyRotation();
|
||||
void applyFullRefreshInterval();
|
||||
uint32_t autoOffMillis() const {
|
||||
|
||||
Reference in New Issue
Block a user