From 38e1d3206591ade5b0b053bc3cef10a620f3d3a2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 16 Apr 2022 22:40:05 +0530 Subject: [PATCH] Actually implement allow_cloning --- kitty/window.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kitty/window.py b/kitty/window.py index 77dee1b2e..21b838586 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -1015,11 +1015,15 @@ class Window: if not msg: if self.current_clone_data: cdata, self.current_clone_data = self.current_clone_data, '' - get_boss().confirm(_( - 'A program running in this window wants to clone it into another window.' - ' Allow it do so, once?'), - partial(self.handle_remote_clone_confirmation, cdata), window=self, - ) + ac = get_options().allow_cloning + if ac == 'ask': + get_boss().confirm(_( + 'A program running in this window wants to clone it into another window.' + ' Allow it do so, once?'), + partial(self.handle_remote_clone_confirmation, cdata), window=self, + ) + elif ac == 'yes': + self.handle_remote_clone_confirmation(cdata, True) self.current_clone_data = '' return num, rest = msg.split(':', 1)