diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-12 20:45:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-12 20:45:18 +0000 |
commit | 6ae19af484763e4ea49a4054ab0a44a28ee85ac6 (patch) | |
tree | 89376e0028ab0f02f9e06aa49876eb96baa6d3da /tbl_term.c | |
parent | fd8254b702c0e458aaf5fe609520c3b90f8d02e8 (diff) | |
download | mandoc-6ae19af484763e4ea49a4054ab0a44a28ee85ac6.tar.gz |
implement the tbl(7) "allbox" option;
used for example by curs_getch(3) and GLwDrawingArea(3)
Diffstat (limited to 'tbl_term.c')
-rw-r--r-- | tbl_term.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -242,6 +242,8 @@ term_tbl(struct termp *tp, const struct tbl_span *sp) cp = cp->next; } else vert = 0; + if (sp->opts->opts & TBL_OPT_ALLBOX) + vert = 1; if (vert == 0) continue; @@ -300,7 +302,9 @@ term_tbl(struct termp *tp, const struct tbl_span *sp) free(tp->tbl.cols); tp->tbl.cols = NULL; tp->tcol->offset = offset; - } + } else if (horiz == 0 && sp->opts->opts & TBL_OPT_ALLBOX) + tbl_hrule(tp, sp, 1); + tp->flags &= ~TERMP_NONOSPACE; } @@ -336,6 +340,8 @@ tbl_hrule(struct termp *tp, const struct tbl_span *sp, int kind) vert = c2->vert; c2 = c2->next; } + if (sp->opts->opts & TBL_OPT_ALLBOX && !vert) + vert = 1; if (vert) tbl_char(tp, cross, vert); if (vert < 2) |