From 913a1e4af12d88a29656c60f7ba2ed0cb5938148 Mon Sep 17 00:00:00 2001 From: Jeremy Cantrell Date: Mon, 13 Jun 2022 17:08:51 -0500 Subject: browsercolumn: Only add the separator when needed When predisplay_right is empty (which is the case when vcs_aware is off), the separator should be omitted. This fixes the error introduced by my last commit. --- ranger/gui/widgets/browsercolumn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 8c166bbb..54149e0c 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -398,8 +398,8 @@ class BrowserColumn(Pager): # pylint: disable=too-many-instance-attributes if infostring: infostringlen = self._total_len(infostring) if space - infostringlen > 2: - sep = [" ", []] if predisplay_right else [] - predisplay_right = infostring + [sep] + predisplay_right + sep = [[" ", []]] if predisplay_right else [] + predisplay_right = infostring + sep + predisplay_right space -= infostringlen + len(sep) textstring = self._draw_text_display(text, space) -- cgit 1.4.1-2-gfad0