When attaching window make its parent tab active

This commit is contained in:
Kovid Goyal 2019-11-09 11:09:29 +05:30
parent 645963cc24
commit 14d693a8ff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 0 deletions

View File

@ -1139,6 +1139,7 @@ class Boss:
if overlaid_window:
target_tab.attach_window(overlaid_window)
self._cleanup_tab_after_window_removal(src_tab)
target_tab.make_active()
def detach_window(self, *args):
if not args:

View File

@ -417,6 +417,11 @@ class Tab: # {{{
def __repr__(self):
return 'Tab(title={}, id={})'.format(self.name or self.title, hex(id(self)))
def make_active(self):
tm = self.tab_manager_ref()
if tm is not None:
tm.set_active_tab(self)
# }}}