Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for and follow tab changes in multipane mode #2061

Merged
merged 7 commits into from Nov 11, 2020
Merged
8 changes: 7 additions & 1 deletion ranger/gui/widgets/statusbar.py
Expand Up @@ -42,6 +42,8 @@ def __init__(self, win, column=None):
self.column = column
self.settings.signal_bind('setopt.display_size_in_status_bar',
self.request_redraw, weak=True)
self.fm.signal_bind('tab.layoutchange', self.request_redraw, weak=True)
self.fm.signal_bind('setop.viewmode', self.request_redraw, weak=True)

def request_redraw(self):
self.need_redraw = True
Expand All @@ -52,9 +54,13 @@ def notify(self, text, duration=0, bad=False):
def clear_message(self):
self.msg = None

def draw(self):
def draw(self): # pylint: disable=too-many-branches
"""Draw the statusbar"""

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
Expand Down