diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-11 07:46:41 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-11 07:46:41 +0000 |
commit | f5fea7af3791272c2240400f3f9c999fa68588c5 (patch) | |
tree | 62fec6dec0f200665542ef799961a245b86fbed3 /term.c | |
parent | f690e8836e76c3e77c127e546135ba106d53d2a7 (diff) | |
download | mandoc-f5fea7af3791272c2240400f3f9c999fa68588c5.tar.gz |
Fix space-before-newline (inspired by schwarze@openbsd.org).
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -278,16 +278,15 @@ term_flushln(struct termp *p) * our breakpoint. */ + if (0 < vis++) + putchar(' '); + for ( ; i < (int)p->col; i++) { if (' ' == p->buf[i]) break; putchar(p->buf[i]); } vis += vsz; - if (i < (int)p->col && vis <= bp) { - putchar(' '); - vis++; - } } /* @@ -312,7 +311,7 @@ term_flushln(struct termp *p) if (p->flags & TERMP_NOBREAK) { if ( ! (TERMP_NONOBREAK & p->flags)) - for ( ; vis < maxvis; vis++) + for ( ; vis <= maxvis; vis++) putchar(' '); } else putchar('\n'); |