From 6571cf2e89a313bfabef0c139f63456da55b4578 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Aug 2021 20:55:59 +0530 Subject: [PATCH] When showing last cmd output convert wrap markers into line breaks This matches the behavior of show_scrollback and works well with overlay windows and if the pager is configured to not wrap --- kitty/window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/window.py b/kitty/window.py index ee52df377..013a46394 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -980,7 +980,8 @@ class Window: Requires :ref:`shell_integration` to work ''') def show_last_command_output(self) -> None: - text = self.last_cmd_output(as_ansi=True, add_wrap_markers=False) + text = self.last_cmd_output(as_ansi=True, add_wrap_markers=True) + text = text.replace('\r\n', '\n').replace('\r', '\n') get_boss().display_scrollback(self, text, title='Last command output') def paste_bytes(self, text: Union[str, bytes]) -> None: