From 38f0cd1c32a24a2d680e60608563f52e6a24dbd3 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 23 Jul 2018 20:40:43 +0200 Subject: Fix "go_to_previous_tab" and remove the usage of Command.win to move internally --- poezio/core/tabs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'poezio/core/tabs.py') diff --git a/poezio/core/tabs.py b/poezio/core/tabs.py index e9646959..81ad155d 100644 --- a/poezio/core/tabs.py +++ b/poezio/core/tabs.py @@ -229,10 +229,12 @@ class Tabs: if tab is self._previous_tab: self._previous_tab = None if is_current: - self._restore_previous_tab() + self.restore_previous_tab() self._validate_current_index() - def _restore_previous_tab(self): + def restore_previous_tab(self): + """Restore the previous tab""" + if self._previous_tab: if not self.set_current_tab(self._previous_tab): self.set_current_index(0) -- cgit v1.2.3