diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-11 10:34:31 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-11 10:34:31 +0000 |
commit | c788f866d218b1363d95abee27eec8df64a79179 (patch) | |
tree | c358e4f772b3db9924cf9048edd02b5be1288702 /term.c | |
parent | 1b7e684476a5dce00e6c6290fdd17c25e38d1e22 (diff) | |
download | mandoc-c788f866d218b1363d95abee27eec8df64a79179.tar.gz |
Clean up validation of field widths.
Pushed field-width warn/error into warn/error routine.
Removed superfluous space at output eoln.
Fixed overzealous line break in lists.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -272,10 +272,9 @@ term_flushln(struct termp *p) vis = p->rmargin - p->offset; } - /* - * Write out the word and a trailing space. Omit the - * space if we're the last word in the line or beyond - * our breakpoint. + /* + * Prepend a space if we're not already at the beginning + * of the line, then the word. */ if (0 < vis++) @@ -294,7 +293,7 @@ term_flushln(struct termp *p) * cause a newline and offset at the right margin. */ - if ((TERMP_NOBREAK & p->flags) && vis >= maxvis) { + if ((TERMP_NOBREAK & p->flags) && vis > maxvis) { if ( ! (TERMP_NONOBREAK & p->flags)) { putchar('\n'); for (i = 0; i < (int)p->rmargin; i++) |