diff options
author | Mark Rogalski <interesting.ones.are.already.taken@gmail.com> | 2016-05-16 20:08:37 +0200 |
---|---|---|
committer | Mark Rogalski <interesting.ones.are.already.taken@gmail.com> | 2016-05-16 20:08:37 +0200 |
commit | 502ceb31e1f957b2d21e7f3dd38ecf284bde207d (patch) | |
tree | 4c13e4b9b4f0c28bfd2f8b020c8a71668f6d77fc /ranger | |
parent | 6dd0a7373824f42ef9fd159c4608efb31a3c8b91 (diff) | |
download | ranger-502ceb31e1f957b2d21e7f3dd38ecf284bde207d.tar.gz |
Fix off-by-one error in space calculation
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 4de476dc..5a72d1b9 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -299,12 +299,18 @@ class BrowserColumn(Pager): # line number field if self.settings.line_numbers: if self.main_column and space - linum_text_len > 2: - linum_format = "{0:>" + str(linum_text_len) + "} " + linum_format = "{0:>" + str(linum_text_len) + "}" + # add separator between line number and tag + linum_format += " " line_number_text = linum_format.format(i) predisplay_left.append([line_number_text, ["directory"]]) space -= linum_text_len + # Delete one additional character for space separator + # between the line number and the tag + space -= 1 + # selection mark tagmark = self._draw_tagged_display(tagged, tagged_marker) tagmarklen = self._total_len(tagmark) |