]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: reduce also SCOLS_FL_WRAP columns
authorKarel Zak <kzak@redhat.com>
Mon, 25 Jan 2016 14:17:36 +0000 (15:17 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 25 Jan 2016 14:17:36 +0000 (15:17 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/src/table_print.c

index 02d9462d56fc77e623cd6bdf418633f86089c38b..3a8db7f87953ac1c8b73007718739a4dca36214e 100644 (file)
@@ -995,7 +995,7 @@ static int recount_widths(struct libscols_table *tb, struct libscols_buffer *buf
                                continue;       /* never truncate columns with absolute sizes */
                        if (scols_column_is_tree(cl) && width <= cl->width_treeart)
                                continue;       /* never truncate the tree */
-                       if (trunc_only && !scols_column_is_trunc(cl))
+                       if (trunc_only && !(scols_column_is_trunc(cl) || scols_column_is_wrap(cl)))
                                continue;
                        if (cl->width == cl->width_min)
                                continue;
@@ -1015,7 +1015,6 @@ static int recount_widths(struct libscols_table *tb, struct libscols_buffer *buf
                                cl->width--;
                                width--;
                        }
-
                }
                if (org == width) {
                        if (trunc_only)