mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-29 16:28:11 +00:00
A message containing a line break drew two words on top of each other in the fullscreen reader. wrapLines() treated '\n' as an ordinary character: it measured it via getCodepointWidth() -- which reports a full 6px cell for it, since 0x0A sits below the font's first glyph -- and copied it into the wrapped line. Both display drivers' print() then acts on '\n' by resetting the cursor to x=0 and stepping down one row, so the tail of that line was drawn straight over the following one. wrapLines() now ends the line at '\n'/'\r' (CRLF counts as one break) and consumes the byte rather than emitting it, preserving blank lines the sender typed while still skipping degenerate empty wrap segments so the loop can't stall. This covers the fullscreen view and the history list's portrait bubbles, which share the function. drawTextEllipsized() folds newlines into spaces for the same reason: it draws one line clipped to max_width, and the compact one-line message previews in the landscape list feed it raw message bodies. A space keeps the words apart and measures the same, so the ellipsis maths is unchanged; for names and labels it's a no-op. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>