From: schwarze Date: Tue, 13 Jun 2017 16:11:58 +0000 (+0000) Subject: If the layout is empty except for requesting a left vertical frame, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6a8d9d411fc0692076b6b14046b1f05eb23f030c;p=openbsd If the layout is empty except for requesting a left vertical frame, record that detail in struct tbl_opts, such that term_tbl() can do correct column calculations and doesn't prematurely break lines. Fixes the tbl/layout/empty regression test that got broken when line breaking in text block cells was implemented. --- diff --git a/usr.bin/mandoc/tbl_layout.c b/usr.bin/mandoc/tbl_layout.c index b3b1cfad1ab..34050957be5 100644 --- a/usr.bin/mandoc/tbl_layout.c +++ b/usr.bin/mandoc/tbl_layout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tbl_layout.c,v 1.29 2017/06/08 18:11:15 schwarze Exp $ */ +/* $OpenBSD: tbl_layout.c,v 1.30 2017/06/13 16:11:58 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2014, 2015, 2017 Ingo Schwarze @@ -296,6 +296,8 @@ tbl_layout(struct tbl_node *tbl, int ln, const char *p, int pos) tbl->parse, ln, pos, NULL); cell_alloc(tbl, tbl->first_row, TBL_CELL_LEFT); + if (tbl->opts.lvert < tbl->first_row->vert) + tbl->opts.lvert = tbl->first_row->vert; return; }