summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-25 00:36:52 +0100
committerhut <hut@lavabit.com>2013-02-25 00:36:52 +0100
commit4052d463749c72992a56990855315f17c5f1a486 (patch)
tree2352daede08e8c3e650471612c1753f4349c769f /ranger
parentf5741fb1c94daeb8df451758b3ae9c8e78358e40 (diff)
downloadranger-4052d463749c72992a56990855315f17c5f1a486.tar.gz
widgets.browsercolumn: Fix wrong trimming of infostring
Files with long names had their infostring trimmed even though the file
name should be trimmed instead to make room for the infostring.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/browsercolumn.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index afe8e13b..793f00af 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -274,10 +274,13 @@ class BrowserColumn(Pager):
                 predisplay_right = []
                 predisplay_left     = []
 
+            infostring = self._draw_infostring_display(drawn, space)
+            space -= self._total_len(infostring)
+
             predisplay_left = predisplay_left + self._draw_text_display(text, space)
             space = self.wid - self._total_len(predisplay_left)  - self._total_len(predisplay_right)
 
-            predisplay_right = self._draw_infostring_display(drawn, space) + predisplay_right
+            predisplay_right = infostring + predisplay_right
             space = self.wid - self._total_len(predisplay_left)  - self._total_len(predisplay_right)
 
             if space > 0: