aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-17 14:55:30 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-17 14:55:30 +0000
commit49598c9d922bda8ee429befd0845df1e70a49217 (patch)
treef7dbd2127ecb93408e2264d9e44f630fb0e92539 /tbl_term.c
parent2fa768dd3258ecc39730b020f47e705a97c74d79 (diff)
downloadmandoc-49598c9d922bda8ee429befd0845df1e70a49217.tar.gz
mandoc-49598c9d922bda8ee429befd0845df1e70a49217.tar.zst
mandoc-49598c9d922bda8ee429befd0845df1e70a49217.zip
tables leak tab settings to subsequent text
Diffstat (limited to 'tbl_term.c')
-rw-r--r--tbl_term.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tbl_term.c b/tbl_term.c
index ea38a970..40342d2f 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_term.c,v 1.53 2017/06/16 20:01:06 schwarze Exp $ */
+/* $Id: tbl_term.c,v 1.54 2017/06/17 14:55:30 schwarze Exp $ */
/*
* Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011,2012,2014,2015,2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -93,6 +93,17 @@ term_tbl(struct termp *tp, const struct tbl_span *sp)
tblcalc(&tp->tbl, sp, tp->tcol->offset, tp->tcol->rmargin);
+ /* Tables leak .ta settings to subsequent text. */
+
+ term_tab_set(tp, NULL);
+ coloff = sp->opts->opts & (TBL_OPT_BOX | TBL_OPT_DBOX) ||
+ sp->opts->lvert;
+ for (ic = 0; ic < sp->opts->cols; ic++) {
+ coloff += tp->tbl.cols[ic].width;
+ term_tab_iset(coloff);
+ coloff += 3;
+ }
+
/* Center the table as a whole. */
offset = tp->tcol->offset;