From c6cf2d08b7295a477d89d01535463d18103f6311 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 22 Jul 2018 16:17:06 +0200 Subject: Fix close_all and change_title plugins --- plugins/change_title.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/change_title.py') diff --git a/plugins/change_title.py b/plugins/change_title.py index 92fcb5c3..e5ed96a8 100644 --- a/plugins/change_title.py +++ b/plugins/change_title.py @@ -8,7 +8,7 @@ import sys class Plugin(BasePlugin): def init(self): - self.on_tab_change(0, self.core.current_tab_nb) + self.on_tab_change(None, new_tab=self.core.tabs.current_tab) self.api.add_event_handler('tab_change', self.on_tab_change) def cleanup(self): @@ -16,8 +16,6 @@ class Plugin(BasePlugin): sys.stdout.write("\x1b]0;poezio\x07") sys.stdout.flush() - def on_tab_change(self, old, new): - new_tab = self.core.get_tab_by_number(new) + def on_tab_change(self, old_tab, new_tab): sys.stdout.write("\x1b]0;{}\x07".format(new_tab.name)) sys.stdout.flush() - -- cgit v1.2.3