Remote control close_tab should not ask for confirmation
This commit is contained in:
parent
384ccb4fc7
commit
6ea5027bf6
2 changed files with 5 additions and 3 deletions
|
|
@ -450,8 +450,7 @@ def confirm_tab_close(self, tab: Tab) -> None:
|
|||
windows = tuple(tab)
|
||||
needs_confirmation = self.opts.confirm_os_window_close > 0 and len(windows) >= self.opts.confirm_os_window_close
|
||||
if not needs_confirmation:
|
||||
for window in windows:
|
||||
self.close_window(window)
|
||||
self.close_tab_no_confirm(tab)
|
||||
return
|
||||
self._run_kitten('ask', ['--type=yesno', '--message', _(
|
||||
'Are you sure you want to close this tab, it has {}'
|
||||
|
|
@ -468,6 +467,9 @@ def handle_close_tab_confirmation(self, tab_id: int, data: Dict[str, Any], *a: A
|
|||
break
|
||||
else:
|
||||
return
|
||||
self.close_tab_no_confirm(tab)
|
||||
|
||||
def close_tab_no_confirm(self, tab: Tab) -> None:
|
||||
for window in tab:
|
||||
self.close_window(window)
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get:
|
|||
for tab in self.tabs_for_match_payload(boss, window, payload_get):
|
||||
if window:
|
||||
if tab:
|
||||
boss.close_tab(tab)
|
||||
boss.close_tab_no_confirm(tab)
|
||||
|
||||
|
||||
close_tab = CloseTab()
|
||||
|
|
|
|||
Loading…
Reference in a new issue