- /* we set a distance for the line-starter column even if its non-broken counterpart
- doesn't touch the right column. */
- if (lb)
- Separation_item::set_distance (lb, r_col, padding);
-
- if (touches || j == i - 1)
- dist = Separation_item::set_distance (l, r_col, padding);
-
- if (j == i - 1 && d == LEFT)
- distances.push_back (dist);
-
- if (j == i - 1)
- cur_dist[d] = distances[j];
-
- cur_dist[d] = max (cur_dist[d], dist);
- done = done && !touches;
+ if (lb)
+ {
+ dist = Separation_item::set_distance (lb, r, padding);
+ // The left-broken version might reach more columns to the
+ // right than the unbroken version, by extending farther and/or
+ // nesting more closely;
+ if (j == i - 1) // check this, the first time we see each lb.
+ overhangs[j] = max (overhangs[j],
+ lb->extent (lb, X_AXIS)[RIGHT]
+ + distances[i] - dist);