diff options
author | Jeremy Cantrell <jmcantrell@gmail.com> | 2022-06-13 17:08:51 -0500 |
---|---|---|
committer | Jeremy Cantrell <jmcantrell@gmail.com> | 2022-06-13 17:08:51 -0500 |
commit | 913a1e4af12d88a29656c60f7ba2ed0cb5938148 (patch) | |
tree | 701187682f20455b9de1c156216b155a9cf1be2b /ranger | |
parent | d8311106abd2925e62650ca371f46bb7648463ca (diff) | |
download | ranger-913a1e4af12d88a29656c60f7ba2ed0cb5938148.tar.gz |
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.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 4 |
1 files 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) |