diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 42f42141f..f16481f2e 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3011,6 +3011,15 @@ static const char* lcd_display_message_fullscreen_nonBlocking_P(const char *msg) bool multi_screen = false; for (uint8_t row = 0; row < LCD_HEIGHT; ++ row) { lcd_set_cursor(0, row); + + // Previous row ended with a complete word, so the first character in the + // next row is a whitespace. We can skip the whitespace on a new line. + if (pgm_is_whitespace(msg) && ++msg == nullptr) + { + // End of the message. + break; + } + uint8_t linelen = min(strlen_P(msg), LCD_WIDTH); const char *msgend2 = msg + linelen; msgend = msgend2;