Skip to content

Commit f19b775

Browse files
seifemarcelstoer
authored andcommitted
also break words on '/'
1 parent 38c59be commit f19b775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/OLEDDisplay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,8 @@ void OLEDDisplay::drawStringMaxWidth(int16_t xMove, int16_t yMove, uint16_t maxL
661661
for (uint16_t i = 0; i < length; i++) {
662662
strWidth += pgm_read_byte(fontData + JUMPTABLE_START + (text[i] - firstChar) * JUMPTABLE_BYTES + JUMPTABLE_WIDTH);
663663

664-
// Always try to break on a space or dash
665-
if (text[i] == ' ' || text[i]== '-') {
664+
// Always try to break on a space, dash or slash
665+
if (text[i] == ' ' || text[i]== '-' || text[i] == '/') {
666666
preferredBreakpoint = i + 1;
667667
widthAtBreakpoint = strWidth;
668668
}

0 commit comments

Comments
 (0)