Fix #71 (Tiny display bug in the column output mode)

This commit is contained in:
Juan RP 2014-12-09 12:33:58 +01:00
parent 16d2640df8
commit b4ce0f1d0f
2 changed files with 10 additions and 3 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.42 (???):
* xbps-{install,query}: fix alignment in the column output mode
when pkgname is shorter than 4 chars. Fix #71 (https://github.com/voidlinux/xbps/issues/71)
* xbps.d(5): new manual page detailing the configuration settings.
* xbps-dgraph(8): added support to generate dependency graphs, repository

View File

@ -103,13 +103,17 @@ print_trans_colmode(struct transaction *trans, int cols)
pnamelen = find_longest_pkgname(trans);
/* header length */
hdrlen = 4 + pnamelen + 60;
hdrlen = pnamelen + 61;
if (cols <= hdrlen)
return false;
printf("\nName");
for (x = 4; x < pnamelen; x++)
printf("\nName ");
if (pnamelen < 5)
pnamelen = 5;
for (x = 5; x < pnamelen; x++)
printf(" ");
printf("Action Version New version Download size\n");
while ((obj = xbps_object_iterator_next(trans->iter)) != NULL) {