-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Describe the bug
When piping the full scrollback buffer with --stdin-source=@screen_scrollback, the text contains the escape sequence for erasing format: ^[[m only in front of the lines that came from the scrollback_pager_history_size buffer.
To Reproduce
Steps to reproduce the behavior:
- Configure a very small scrollback buffer size and a mapping to save the buffer:
scrollback_lines 10
scrollback_pager_history_size 1
map ctrl+shift+x launch --stdin-source=@screen_scrollback --type=background /bin/dd of=/tmp/test.output
- Restart kitty and generate some output, for example:
yes "XXXXXXXXXXX" - Enter
ctrl+shift+xor whatever hotkey configured - Edit
/tmp/test.outputin vim or some editor that doesn't take in account escape codes.
Expected behavior
Escape codes/sequences should not be saved without --stdin-add-formatting
Environment details
OS: MacOs Big Dissapointment 11.0.1
kitty 0.19.2 created by Kovid Goyal
Darwin moria 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64
ProductName: macOS ProductVersion: 11.0.1 BuildVersion: 20B29
Loaded config files: /Users/aomanu/.config/kitty/kitty.conf
Config options different from defaults:
scrollback_lines 10
scrollback_pager_history_size 1048576
Added shortcuts:
shift+control+x KeyAction(func='launch', args=['--stdin-source=@screen_scrollback', '--type=background', '/bin/dd', 'of=/tmp/test.output'])