From bc276f1e2efe56d1cccf7eb80a711cd7c9391656 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Nov 2025 22:57:47 +0530 Subject: [PATCH] Return the window scrollback is displayed in --- kitty/boss.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kitty/boss.py b/kitty/boss.py index 9bc5095dd..4d0906cbf 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -2035,7 +2035,7 @@ class Boss: s.shutdown(socket.SHUT_RDWR) s.close() - def display_scrollback(self, window: Window, data: bytes | str, input_line_number: int = 0, title: str = '', report_cursor: bool = True) -> None: + def display_scrollback(self, window: Window, data: bytes | str, input_line_number: int = 0, title: str = '', report_cursor: bool = True) -> Window | None: def prepare_arg(x: str) -> str: x = x.replace('INPUT_LINE_NUMBER', str(input_line_number)) @@ -2065,10 +2065,11 @@ class Boss: else: bdata = re.sub(br'\x1b\].*?\x1b\\', b'', bdata) - tab.new_special_window( + return tab.new_special_window( SpecialWindow(cmd, bdata, title or _('History'), overlay_for=window.id, cwd=window.cwd_of_child), copy_colors_from=self.active_window ) + return None @ac('misc', 'Edit the kitty.conf config file in your favorite text editor') def edit_config_file(self, *a: Any) -> None: