From eb006a6688310723b081580cc49d43748429fc9c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 14 Jul 2019 10:02:33 +0530 Subject: [PATCH] Indicate if set_active_tab() worked or not --- kitty/boss.py | 3 ++- kitty/tabs.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kitty/boss.py b/kitty/boss.py index 9b1a7894a..83f86cd56 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -846,7 +846,8 @@ class Boss: def set_active_tab(self, tab): tm = self.active_tab_manager if tm is not None: - tm.set_active_tab(tab) + return tm.set_active_tab(tab) + return False def next_tab(self): tm = self.active_tab_manager diff --git a/kitty/tabs.py b/kitty/tabs.py index d5adfe1d3..8ab17c8fd 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -478,8 +478,9 @@ class TabManager: # {{{ try: idx = self.tabs.index(tab) except Exception: - return + return False self.set_active_tab_idx(idx) + return True def next_tab(self, delta=1): if len(self.tabs) > 1: