From a788cd9f64d2bcc3f4d8bde0ca71cd042e9a4bf4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 31 Oct 2021 10:15:06 +0530 Subject: [PATCH] Also clear the current visual select when selecting in stack layout --- kitty/boss.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kitty/boss.py b/kitty/boss.py index dcb10c83a..8ba526122 100755 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -905,14 +905,15 @@ class Boss: if get_options().enable_audio_bell: ring_bell() return + cvs = self.current_visual_select def chosen(ans: Union[None, int, str]) -> None: - if isinstance(ans, int): + if cvs and self.current_visual_select is cvs and isinstance(ans, int): for tab in self.all_tabs: - if tab.id == tab_id and self.current_visual_select: + if tab.id == tab_id: w = self.window_id_map.get(ans) if w is not None: - self.current_visual_select.callback(tab, w) + cvs.callback(tab, w) break self.current_visual_select = None self.choose_entry(msg, windows, chosen)