From 84fc1ec271328e064da8b2537112b724e5a4c3b5 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Wed, 8 Jun 2022 13:06:01 -0700 Subject: eshowkw: Fix missing dash for -r? ebuilds in versionlist output Turns out the real issue causing the row alignment issue was this. The code inadvertently dropped the dash display which in turn caused the row alignment issue. Reverts: 4695379c1921865d7763669580ac909ea94db90d Gentoo-bug-url: https://bugs.gentoo.org/503366 Signed-off-by: Brian Dolbec --- pym/gentoolkit/eshowkw/__init__.py | 2 +- pym/gentoolkit/eshowkw/display_pretty.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/eshowkw/__init__.py b/pym/gentoolkit/eshowkw/__init__.py index c33c47a..ba6c076 100644 --- a/pym/gentoolkit/eshowkw/__init__.py +++ b/pym/gentoolkit/eshowkw/__init__.py @@ -49,7 +49,7 @@ def process_display(package, keywords, dbapi): content.extend(sep) content.extend(keywords.extra) header_length = keywords.length - content_length = portdata.version_length - 1 + content_length = portdata.version_length display(content, header, header_length, content_length, portdata.cp, topper) diff --git a/pym/gentoolkit/eshowkw/display_pretty.py b/pym/gentoolkit/eshowkw/display_pretty.py index 0629d7e..82fd446 100644 --- a/pym/gentoolkit/eshowkw/display_pretty.py +++ b/pym/gentoolkit/eshowkw/display_pretty.py @@ -125,6 +125,6 @@ class string_rotator: if x.find("+ -") != -1: x = x.replace(" ", "-") # strip all chars and remove empty lines - if not strip or len(x.strip(" |-")) > 0: + if not strip or len(x.strip(" |-")) > 0 or '-' in x: tmp.append(x) return tmp -- cgit v1.2.3