*/
int const split_width = min(max_width - wid_brk, brk.dim.wid - 2);
if (brk.splitAt(split_width, next_width, BEST_EFFORT, tail)) {
- // if we did not manage to fit a part of the element into
- // the split_width limit, at least remember that we can
- // shorten the row if needed.
- if (brk.dim.wid > split_width) {
- min_row_wid = wid_brk + brk.dim.wid;
- tail.clear();
- continue;
- }
/* if this element originally did not cause a row overflow
* in itself, and the remainder of the row would still be
* too large after breaking, then we will have issues in
tail.clear();
break;
}
+ /* if we did not manage to fit a part of the element into
+ * the split_width limit, at least remember that we can
+ * shorten the row if needed.
+ */
+ if (brk.dim.wid > split_width) {
+ min_row_wid = wid_brk + brk.dim.wid;
+ tail.clear();
+ continue;
+ }
// We have found a proper place where to break this string element.
end_ = brk.endpos;
*cit_brk = brk;