From f067de449578636441be8d471127e415b460bbf4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 31 Aug 2016 13:01:48 +0200 Subject: [PATCH] libsmartcols: fix non-tty output for 'maxout' columns Signed-off-by: Karel Zak --- libsmartcols/src/table_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index d24700c378..28f6f7a5c7 100644 --- a/libsmartcols/src/table_print.c +++ b/libsmartcols/src/table_print.c @@ -965,7 +965,7 @@ static int count_column_width(struct libscols_table *tb, cl->width = 0; if (!cl->width_min) { - if (cl->width_hint < 1 && scols_table_is_maxout(tb)) + if (cl->width_hint < 1 && scols_table_is_maxout(tb) && tb->is_term) cl->width_min = (size_t) (cl->width_hint * tb->termwidth) - (is_last_column(cl) ? 0 : 1); if (scols_cell_get_data(&cl->header)) { size_t len = mbs_safe_width(scols_cell_get_data(&cl->header)); -- 2.47.3