Indicate if set_active_tab() worked or not

This commit is contained in:
Kovid Goyal 2019-07-14 10:02:33 +05:30
parent 40b9049deb
commit eb006a6688
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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: