summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-08-05 23:36:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-08-05 23:36:42 +0000
commit20b1a5ef7f370e238b774d0fb38b8cb6bedae40f (patch)
tree8400db828d5b931aceea36559e595ea075bcc689 /term.c
parent643ebb0f93d8927d672a9364ca2c464d0e9f5da8 (diff)
downloadmandoc-20b1a5ef7f370e238b774d0fb38b8cb6bedae40f.tar.gz
After a leading blank on an output line, the first word was counted twice
against vend, causing a premature line break. Fix that bug by reverting revision 1.93 which Kristaps committed four years ago. Kristaps patch is no longer needed because the code below /* Write out the [remaining] word. */ now handles leading blanks correctly, probably already for a long time. This avoids premature line breaks in about a dozen base system manuals, for example as(1) and gdb(1), and alignment issues in another twenty, for example mount(2), ip6(4), pfctl(8), and crypto(9).
Diffstat (limited to 'term.c')
-rw-r--r--term.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term.c b/term.c
index 9c10bce7..c6cc883c 100644
--- a/term.c
+++ b/term.c
@@ -162,7 +162,7 @@ term_flushln(struct termp *p)
*/
for (j = i, jhy = 0; j < p->col; j++) {
- if ((j && ' ' == p->buf[j]) || '\t' == p->buf[j])
+ if (' ' == p->buf[j] || '\t' == p->buf[j])
break;
/* Back over the the last printed character. */