diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-06 11:03:03 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-06 11:03:03 +0000 |
commit | 81a8bde7e1b96fcaa41ea3eeb493fa2b628634b1 (patch) | |
tree | e679b127f31a431c3029e8040cb58d14071d3fbf | |
parent | 2479665885291314c674c00adaea2c9589d68e84 (diff) | |
download | mandoc-81a8bde7e1b96fcaa41ea3eeb493fa2b628634b1.tar.gz |
Flush the line preceding a table before clearing the right margin,
such that that line isn't output with unlimited width.
Problem reported and fix OK by kristaps@.
-rw-r--r-- | tbl_term.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -66,6 +66,9 @@ term_tbl(struct termp *tp, const struct tbl_span *sp) size_t rmargin, maxrmargin, tsz; int ic, horiz, spans, vert; + if (tp->tbl.cols == NULL) + term_flushln(tp); + rmargin = tp->rmargin; maxrmargin = tp->maxrmargin; @@ -82,8 +85,6 @@ term_tbl(struct termp *tp, const struct tbl_span *sp) */ if (tp->tbl.cols == NULL) { - term_flushln(tp); - tp->tbl.len = term_tbl_len; tp->tbl.slen = term_tbl_strlen; tp->tbl.arg = tp; |