Forgot to change tab_ref when attaching window

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

View File

@ -324,8 +324,7 @@ class Tab: # {{{
return underlaid_window, overlaid_window
def attach_window(self, window):
window.tab_id = self.id
window.os_window_id = self.os_window_id
window.change_tab(self)
attach_window(self.os_window_id, self.id, window.id)
self._add_window(window)

View File

@ -163,6 +163,11 @@ class Window:
else:
setup_colors(self.screen, opts)
def change_tab(self, tab):
self.tab_id = tab.id
self.os_window_id = tab.os_window_id
self.tabref = weakref.ref(tab)
@property
def title(self):
return self.override_title or self.child_title