Skip to content

Commit

Permalink
Handle multiple consecutive spaces in word wrapping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Jan 27, 2024
1 parent b4f9728 commit ece9fe4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/components/ear_combo_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ namespace {
// take and store the section of line up to the last found space.
if (w > width) {
dstArr.add(line.substring(0, sp));
// Remove the stored section from the line being processed, inc space.
// Reset the space position to zero and rerun.
line = line.substring(sp + 1);
// Remove the stored section from the line being processed, inc
// spaces at wrapping point. Reset space position and rerun.
line = line.substring(sp).trimStart();
sp = 0;
}
else {
Expand Down

0 comments on commit ece9fe4

Please sign in to comment.