Remote control close_tab should not ask for confirmation
This commit is contained in:
parent
384ccb4fc7
commit
6ea5027bf6
@ -450,8 +450,7 @@ class Boss:
|
|||||||
windows = tuple(tab)
|
windows = tuple(tab)
|
||||||
needs_confirmation = self.opts.confirm_os_window_close > 0 and len(windows) >= self.opts.confirm_os_window_close
|
needs_confirmation = self.opts.confirm_os_window_close > 0 and len(windows) >= self.opts.confirm_os_window_close
|
||||||
if not needs_confirmation:
|
if not needs_confirmation:
|
||||||
for window in windows:
|
self.close_tab_no_confirm(tab)
|
||||||
self.close_window(window)
|
|
||||||
return
|
return
|
||||||
self._run_kitten('ask', ['--type=yesno', '--message', _(
|
self._run_kitten('ask', ['--type=yesno', '--message', _(
|
||||||
'Are you sure you want to close this tab, it has {}'
|
'Are you sure you want to close this tab, it has {}'
|
||||||
@ -468,6 +467,9 @@ class Boss:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
self.close_tab_no_confirm(tab)
|
||||||
|
|
||||||
|
def close_tab_no_confirm(self, tab: Tab) -> None:
|
||||||
for window in tab:
|
for window in tab:
|
||||||
self.close_window(window)
|
self.close_window(window)
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ If specified close the tab this command is run in, rather than the active tab.
|
|||||||
for tab in self.tabs_for_match_payload(boss, window, payload_get):
|
for tab in self.tabs_for_match_payload(boss, window, payload_get):
|
||||||
if window:
|
if window:
|
||||||
if tab:
|
if tab:
|
||||||
boss.close_tab(tab)
|
boss.close_tab_no_confirm(tab)
|
||||||
|
|
||||||
|
|
||||||
close_tab = CloseTab()
|
close_tab = CloseTab()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user