summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-02-08 10:25:51 -0500
committerAllan McRae <allan@archlinux.org>2014-09-30 14:05:13 +1000
commitb275e5184ef1acc3f8dd4a02131149a9b58a5828 (patch)
tree5cde68c48b64016fefd3c28a371fe447650fa572 /src
parentdc339faf6ad0dc07ab33c9f5bbdeecad5a927b6b (diff)
downloadpacman-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>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c2
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;