diff --git a/qutebrowser/mainwindow/statusbar/backforward.py b/qutebrowser/mainwindow/statusbar/backforward.py index 302de4d95..fe044e621 100644 --- a/qutebrowser/mainwindow/statusbar/backforward.py +++ b/qutebrowser/mainwindow/statusbar/backforward.py @@ -34,6 +34,10 @@ class Backforward(textbase.TextBase): self.setText('') self.hide() return + self.on_tab_changed(tab) + + def on_tab_changed(self, tab): + """Update the text based on the given tab.""" text = '' if tab.history.can_go_back(): text += '<' diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index 64a084327..c6fafe14f 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -325,6 +325,7 @@ class StatusBar(QWidget): self.url.on_tab_changed(tab) self.prog.on_tab_changed(tab) self.percentage.on_tab_changed(tab) + self.backforward.on_tab_changed(tab) self.maybe_hide() assert tab.private == self._color_flags.private