summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man_term.c8
-rw-r--r--mdoc_term.c2
-rw-r--r--tbl_term.c3
3 files changed, 4 insertions, 9 deletions
diff --git a/man_term.c b/man_term.c
index 8fe39774..4d95e9f4 100644
--- a/man_term.c
+++ b/man_term.c
@@ -945,12 +945,8 @@ print_man_node(DECL_ARGS)
p->flags |= TERMP_NOSPACE;
return;
case MAN_TBL:
- /*
- * Tables are preceded by a newline. Then process a
- * table line, which will cause line termination,
- */
- if (n->span->prev == NULL)
- term_newln(p);
+ if (p->tbl.cols == NULL)
+ term_vspace(p);
term_tbl(p, n->span);
return;
default:
diff --git a/mdoc_term.c b/mdoc_term.c
index 33591c38..0f23ec15 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -348,6 +348,8 @@ print_mdoc_node(DECL_ARGS)
p->flags |= TERMP_NOSPACE;
break;
case MDOC_TBL:
+ if (p->tbl.cols == NULL)
+ term_newln(p);
term_tbl(p, n->span);
break;
default:
diff --git a/tbl_term.c b/tbl_term.c
index 54e0303b..a2a3996c 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -66,9 +66,6 @@ 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;