When closing a tab, go to the previous one, and not the one before it in the tab list
This commit is contained in:
parent
16276cd163
commit
c66bae5412
1 changed files with 3 additions and 0 deletions
|
@ -1234,6 +1234,9 @@ class Core(object):
|
||||||
del tab.commands # and make the object collectable
|
del tab.commands # and make the object collectable
|
||||||
tab.on_close()
|
tab.on_close()
|
||||||
nb = tab.nb
|
nb = tab.nb
|
||||||
|
if self.previous_tab_nb != nb:
|
||||||
|
self.current_tab_nb = self.previous_tab_nb
|
||||||
|
self.previous_tab_nb = 0
|
||||||
if config.get('create_gaps', False):
|
if config.get('create_gaps', False):
|
||||||
if nb >= len(self.tabs) - 1:
|
if nb >= len(self.tabs) - 1:
|
||||||
self.tabs.remove(tab)
|
self.tabs.remove(tab)
|
||||||
|
|
Loading…
Reference in a new issue