Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrollback_pager_history_size keeps formatting escape codes without --stdin-add-formatting #3132

aorith opened this issue Nov 30, 2020 · 0 comments


Copy link

aorith commented Nov 30, 2020

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:

  1. 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
  1. Restart kitty and generate some output, for example: yes "XXXXXXXXXXX"
  2. Enter ctrl+shift+x or whatever hotkey configured
  3. Edit /tmp/test.output in 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'])
@aorith aorith added the bug label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant