about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorMyk <politas@gmail.com>2020-08-01 18:35:14 +1000
committerMyk <politas@gmail.com>2020-08-01 18:35:14 +1000
commit1481d2a6136052ceb5f4410e2922564229721cb4 (patch)
tree34831451bed557e2ba3bc8946bd40474909fbc2d /ranger
parentb92366f5308666f03a3418519c1b1700ed7e86fe (diff)
downloadranger-1481d2a6136052ceb5f4410e2922564229721cb4.tar.gz
Test for and follow tab changes in multipane mode
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/statusbar.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index fd44613e..6499135f 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -42,6 +42,7 @@ class StatusBar(Widget):  # pylint: disable=too-many-instance-attributes
         self.column = column
         self.settings.signal_bind('setopt.display_size_in_status_bar',
                                   self.request_redraw, weak=True)
+        self.fm.signal_bind('tab.change', self.request_redraw, weak=True)
 
     def request_redraw(self):
         self.need_redraw = True
@@ -52,9 +53,14 @@ class StatusBar(Widget):  # pylint: disable=too-many-instance-attributes
     def clear_message(self):
         self.msg = None
 
-    def draw(self):
+    def draw(self):  # pylint: disable=too-many-branches
         """Draw the statusbar"""
 
+        if self.fm.ui.viewmode == self.fm.ui.ALLOWED_VIEWMODES[1]:
+            if self.column != self.fm.ui.browser.main_column:
+                self.column = self.fm.ui.browser.main_column
+                self.need_redraw = True
+
         if self.hint and isinstance(self.hint, str):
             if self.old_hint != self.hint:
                 self.need_redraw = True