diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-02-08 16:25:51 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-09-30 06:05:13 +0200 |
commit | b275e5184ef1acc3f8dd4a02131149a9b58a5828 (patch) | |
tree | 5cde68c48b64016fefd3c28a371fe447650fa572 | |
parent | dc339faf6ad0dc07ab33c9f5bbdeecad5a927b6b (diff) | |
download | pacman-b275e5184ef1acc3f8dd4a02131149a9b58a5828.tar.gz pacman-b275e5184ef1acc3f8dd4a02131149a9b58a5828.tar.xz |
table_display: only check width when non-zero
A width of 0 indicates that either pacman is not attached
to a tty or the user does not want line wrapping. Either
way pacman should not fall back to the basic display.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
-rw-r--r-- | src/pacman/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index 3f2ed83b..36f4414a 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -640,7 +640,7 @@ static int table_display(const alpm_list_t *header, totalwidth = table_calc_widths(first, rows, padding, totalcols, &widths, &has_data); /* return -1 if terminal is not wide enough */ - if(totalwidth > cols) { + if(cols && totalwidth > cols) { pm_printf(ALPM_LOG_WARNING, _("insufficient columns available for table display\n")); ret = -1; |