// the width available for the row.
int const width = max_width_ - row.right_margin;
- if (pos >= end || row.width() > width) {
+ if (pos >= end) {
row.endpos(end);
return;
}
// or the end of the par, then build a representation of the row.
pos_type i = pos;
FontIterator fi = FontIterator(*this, par, pit, pos);
- while (i < end && row.width() <= width) {
+ do {
char_type c = par.getChar(i);
// The most special cases are handled first.
if (par.isInset(i)) {
++i;
++fi;
- }
+ } while (i < end && row.width() <= width);
row.finalizeLast();
row.endpos(i);