Werner LEMBERG <[EMAIL PROTECTED]> wrote:

> I haven't found out yet the cause of this behaviour; I invite you to
> use a debugger so that you can find the relevant spot. :-)

The problem is in environment::do_break() after the comment
"this is so that hyphenation works". A zero-length space is
added, so line->width() is zero when possibly_break_line()
gets called, and the length of a real space at the end of
the line is not subtracted from width_total anymore when
considering whether to spread the line.

Adding the zero-length space only if line->nspaces() == 0
looks like a possible fix to me.

Test input:

.ds a \ \h'-1u'
.ll \w'some\*a text and a \(br'u
some\*a text and a \(br
some text and a \(br

(The box rules should not align.)

        Gunnar


_______________________________________________
Groff mailing list
Groff@gnu.org
http://lists.gnu.org/mailman/listinfo/groff

Reply via email to