Fix the tab switching if a terminal on another tab exits
This commit is contained in:
parent
3a07b6e53c
commit
3d85444903
|
@ -137,6 +137,8 @@ terminator trunk:
|
||||||
appears in the config file (Steve Boddy, LP#1262709)
|
appears in the config file (Steve Boddy, LP#1262709)
|
||||||
* Fix the way alternatives are set up that cures blurry/incorrect
|
* Fix the way alternatives are set up that cures blurry/incorrect
|
||||||
icons in task switchers (Steve Boddy, LP#1067287)
|
icons in task switchers (Steve Boddy, LP#1067287)
|
||||||
|
* Fix the tab switching if a terminal on another tab exits (Steve
|
||||||
|
Boddy, LP#943311)
|
||||||
|
|
||||||
terminator 0.97:
|
terminator 0.97:
|
||||||
* Allow font dimming in inactive terminals
|
* Allow font dimming in inactive terminals
|
||||||
|
|
|
@ -244,6 +244,21 @@ class Paned(Container):
|
||||||
if self.closeterm(widget):
|
if self.closeterm(widget):
|
||||||
# At this point we only have one child, which is the surviving term
|
# At this point we only have one child, which is the surviving term
|
||||||
sibling = self.children[0]
|
sibling = self.children[0]
|
||||||
|
|
||||||
|
focus_sibling = True
|
||||||
|
if self.get_toplevel().is_child_notebook():
|
||||||
|
notebook = self.get_toplevel().get_children()[0]
|
||||||
|
tabnum = notebook.page_num_descendant(widget)
|
||||||
|
nth_page = notebook.get_nth_page(tabnum)
|
||||||
|
if notebook.last_active_term[nth_page] == widget.uuid:
|
||||||
|
notebook.set_last_active_term(sibling.uuid)
|
||||||
|
notebook.clean_last_active_term()
|
||||||
|
self.get_toplevel().last_active_term = None
|
||||||
|
if notebook.get_current_page() != tabnum:
|
||||||
|
focus_sibling = False
|
||||||
|
elif self.get_toplevel().last_active_term != widget.uuid:
|
||||||
|
focus_sibling = False
|
||||||
|
|
||||||
self.remove(sibling)
|
self.remove(sibling)
|
||||||
|
|
||||||
metadata = None
|
metadata = None
|
||||||
|
@ -253,7 +268,8 @@ class Paned(Container):
|
||||||
parent.remove(self)
|
parent.remove(self)
|
||||||
self.cnxids.remove_all()
|
self.cnxids.remove_all()
|
||||||
parent.add(sibling, metadata)
|
parent.add(sibling, metadata)
|
||||||
sibling.grab_focus()
|
if focus_sibling:
|
||||||
|
sibling.grab_focus()
|
||||||
else:
|
else:
|
||||||
dbg("Paned::wrapcloseterm: self.closeterm failed")
|
dbg("Paned::wrapcloseterm: self.closeterm failed")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue