Better fix for closing non-active tab
This commit is contained in:
parent
13b900faf7
commit
0d94ca5399
@ -551,6 +551,10 @@ class Boss:
|
||||
if not needs_confirmation:
|
||||
self.close_tab_no_confirm(tab)
|
||||
return
|
||||
if tab is not self.active_tab:
|
||||
tm = tab.tab_manager_ref()
|
||||
if tm is not None:
|
||||
tm.set_active_tab(tab)
|
||||
self._run_kitten('ask', ['--type=yesno', '--message', _(
|
||||
'Are you sure you want to close this tab, it has {}'
|
||||
' windows running?').format(num)],
|
||||
|
||||
@ -999,7 +999,6 @@ class TabManager: # {{{
|
||||
self.set_active_tab_idx(i)
|
||||
elif button == GLFW_MOUSE_BUTTON_MIDDLE:
|
||||
tab = self.tabs[i]
|
||||
self.set_active_tab(tab)
|
||||
get_boss().close_tab(tab)
|
||||
self.recent_mouse_events.append(TabMouseEvent(button, modifiers, action, now, i))
|
||||
if len(self.recent_mouse_events) > 5:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user