From 42cf522c06080d3b92d7c87d3e00d93d3a7e1a7f Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Tue, 7 Jun 2022 16:55:35 -0700 Subject: eshowkw: Fix bug 503366 row alignment issue The first element in the plain_list was a "------" string. This was causing the corner image to throw off the row alignment between the two columns. This fix corrects the alignment, but removes the "------" above the keywords to complete the header seperator line. Gentoo-bug-url: https://bugs.gentoo.org/503366 Signed-off-by: Brian Dolbec --- pym/gentoolkit/eshowkw/display_pretty.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/eshowkw/display_pretty.py b/pym/gentoolkit/eshowkw/display_pretty.py index d58036a..47d18d1 100644 --- a/pym/gentoolkit/eshowkw/display_pretty.py +++ b/pym/gentoolkit/eshowkw/display_pretty.py @@ -1,4 +1,4 @@ -# vim:fileencoding=utf-8 +# vim:fileencoding=utf-8 # Copyright 2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 @@ -29,7 +29,8 @@ def display( # data corner_image = ["".ljust(plain_width) for x in range(rotated_height)] if toplist != "archlist": - corner_image.extend(plain_list) + # DON'T add the first list item which is: "-------", it will throw the row alignment off + corner_image.extend(plain_list[1:]) data_printout = [ "%s%s" % (x, y) for x, y in zip_longest(corner_image, rotated_list, fillvalue=corner_image[0]) -- cgit v1.2.3