From b9c9c79db57653ef779df3251313389a9fe378ec Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 5 Aug 2013 23:36:42 +0000 Subject: 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). --- term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 44973491..5eef6275 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.207 2013/05/29 15:17:52 schwarze Exp $ */ +/* $Id: term.c,v 1.208 2013/08/05 23:36:42 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012 Ingo Schwarze @@ -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. */ -- cgit v1.2.3