This commit is contained in:
Kovid Goyal 2022-04-18 17:04:05 +05:30
parent c0d9b6e979
commit b569c01b49
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1018,9 +1018,8 @@ class TabManager: # {{{
def remove(self, tab: Tab) -> None:
active_tab_before_removal = self.active_tab
active_tab_needs_to_change = active_tab_before_removal is tab
self._remove_tab(tab)
active_tab = self.active_tab
active_tab_needs_to_change = (active_tab is None and (active_tab_before_removal is None or active_tab_before_removal is tab)) or active_tab is tab
while True:
try:
self.active_tab_history.remove(tab.id)