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
This commit is contained in:
Kovid Goyal 2021-08-05 20:55:59 +05:30
parent aa739cdfd4
commit 6571cf2e89
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: