From a03895d16836ec105b7b21d6333f6b137f1d349e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 13 Jun 2017 16:12:01 +0000 Subject: 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. --- tbl_layout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tbl_layout.c') diff --git a/tbl_layout.c b/tbl_layout.c index d27ac3cd..5357d808 100644 --- a/tbl_layout.c +++ b/tbl_layout.c @@ -1,4 +1,4 @@ -/* $Id: tbl_layout.c,v 1.42 2017/06/08 18:11:22 schwarze Exp $ */ +/* $Id: tbl_layout.c,v 1.43 2017/06/13 16:12:01 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2014, 2015, 2017 Ingo Schwarze @@ -298,6 +298,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; } -- cgit v1.2.3-56-ge451