From cefbbd6e593181dcf7ade9984cd13b7872f32921 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 28 Dec 2018 11:13:25 -0500 Subject: [PATCH] table printer: Report actual width When we can't shrink all the way to the desired number of columns, report the actual width we've achieved. Closes: #2496 Approved by: matthiasclasen --- app/flatpak-table-printer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/flatpak-table-printer.c b/app/flatpak-table-printer.c index ba1102a9..3b50c484 100644 --- a/app/flatpak-table-printer.c +++ b/app/flatpak-table-printer.c @@ -503,8 +503,11 @@ flatpak_table_printer_print_full (FlatpakTablePrinter *printer, if (leftover == 0) break; } - } + } } + + for (i = 0; i < printer->n_columns; i++) + width -= shrinks[i]; } if (flatpak_fancy_output () && has_title)