From 52cebf0150d2e18e90a6d396863e2465370f8d3a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Nov 2023 08:09:51 +0530 Subject: [PATCH] DRYer --- kitty/boss.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/kitty/boss.py b/kitty/boss.py index 53524569c..436eabcd1 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -1947,16 +1947,7 @@ class Boss: prefilled = '' self.get_line( _('Enter the new title for this tab below. An empty title will cause the default title to be used.'), - partial(self.do_set_tab_title, tab.id), window=tab.active_window, initial_value=prefilled) - - def do_set_tab_title(self, tab_id: int, title: str) -> None: - tm = self.active_tab_manager - if tm is not None: - tab_id = int(tab_id) - for tab in tm.tabs: - if tab.id == tab_id: - tab.set_title(title) - break + tab.set_title, window=tab.active_window, initial_value=prefilled) def create_special_window_for_show_error(self, title: str, msg: str, overlay_for: Optional[int] = None) -> SpecialWindowInstance: ec = sys.exc_info()