diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-09-21 09:57:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-09-21 09:57:13 +0000 |
commit | 0be43712709f49afb18d3b229796c36f89ed65d2 (patch) | |
tree | 4354910ba7a02da33dda25d5c29cb9b5aade9846 /man_term.c | |
parent | 5ca4e4e209b32b27559ef2b3349bd0c55a08ca74 (diff) | |
download | mandoc-0be43712709f49afb18d3b229796c36f89ed65d2.tar.gz mandoc-0be43712709f49afb18d3b229796c36f89ed65d2.tar.zst mandoc-0be43712709f49afb18d3b229796c36f89ed65d2.zip |
As noticed by kristaps@, when breaking an overflowing line,
forget about pending whitespace (vbl), or the next line would
be misaligned and potentially too long; but i'm fixing this
in a simpler way than he proposed.
Also remove the kludges in .HP that compensated for this bug.
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.120 2011/09/20 14:20:48 schwarze Exp $ */ +/* $Id: man_term.c,v 1.121 2011/09/21 09:57:13 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -251,7 +251,7 @@ pre_literal(DECL_ARGS) * indentation has to be set up explicitly. */ if (MAN_HP == n->parent->tok && p->rmargin < p->maxrmargin) { - p->offset = p->rmargin + 1; + p->offset = p->rmargin; p->rmargin = p->maxrmargin; p->flags &= ~(TERMP_NOBREAK | TERMP_TWOSPACE); p->flags |= TERMP_NOSPACE; @@ -469,9 +469,7 @@ pre_HP(DECL_ARGS) len = (size_t)ival; one = term_len(p, 1); - if (len > one) - len -= one; - else + if (len < one) len = one; p->offset = mt->offset; |