DRYer
This commit is contained in:
parent
4a83584934
commit
7e53db8aac
1 changed files with 2 additions and 4 deletions
|
|
@ -755,10 +755,8 @@ def new_tab(
|
|||
def remove(self, tab: Tab) -> None:
|
||||
active_tab_before_removal = self.active_tab
|
||||
self._remove_tab(tab)
|
||||
try:
|
||||
active_tab_needs_to_change = (self.active_tab is None and active_tab_before_removal is None) or self.active_tab is tab
|
||||
except IndexError:
|
||||
active_tab_needs_to_change = True
|
||||
active_tab = self.active_tab
|
||||
active_tab_needs_to_change = (active_tab is None and active_tab_before_removal is None) or active_tab is tab
|
||||
while True:
|
||||
try:
|
||||
self.active_tab_history.remove(tab.id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue