summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-09-21 09:57:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-09-21 09:57:13 +0000
commitab90ef69edb0f646ba1ee587c9f10a3f47bea419 (patch)
tree3a649e2667a3b6358702fdbc25b28dda667adbb5 /term.c
parent70987265bc502c45e27be707bfa9a2e5f5981e31 (diff)
downloadmandoc-ab90ef69edb0f646ba1ee587c9f10a3f47bea419.tar.gz
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 'term.c')
-rw-r--r--term.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/term.c b/term.c
index 30f2714c..6a8672de 100644
--- a/term.c
+++ b/term.c
@@ -184,14 +184,12 @@ term_flushln(struct termp *p)
if (vend > bp && 0 == jhy && vis > 0) {
vend -= vis;
(*p->endline)(p);
+ p->viscol = 0;
if (TERMP_NOBREAK & p->flags) {
- p->viscol = p->rmargin;
- (*p->advance)(p, p->rmargin);
+ vbl = p->rmargin;
vend += p->rmargin - p->offset;
- } else {
- p->viscol = 0;
+ } else
vbl = p->offset;
- }
/* Remove the p->overstep width. */