This commit is contained in:
Kovid Goyal 2021-03-16 20:59:54 +05:30
parent b063c8cda1
commit f3e2a42c29
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -745,7 +745,10 @@ class TabManager: # {{{
def remove(self, tab: Tab) -> None: def remove(self, tab: Tab) -> None:
self._remove_tab(tab) self._remove_tab(tab)
active_tab_needs_to_change = self.active_tab is None or self.active_tab is tab try:
active_tab_needs_to_change = self.active_tab is None or self.active_tab is tab
except IndexError:
active_tab_needs_to_change = True
while True: while True:
try: try:
self.active_tab_history.remove(tab.id) self.active_tab_history.remove(tab.id)