aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit0be43712709f49afb18d3b229796c36f89ed65d2 (patch)
tree4354910ba7a02da33dda25d5c29cb9b5aade9846 /term.c
parent5ca4e4e209b32b27559ef2b3349bd0c55a08ca74 (diff)
downloadmandoc-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 'term.c')
-rw-r--r--term.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/term.c b/term.c
index 1ee33ece..4ca15ed6 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.200 2011/09/19 22:36:16 schwarze Exp $ */
+/* $Id: term.c,v 1.201 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>
@@ -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. */