-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix ansi pager history santizer #1657
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
fix ansi pager history santizer #1657
Conversation
kitty/window.py
Outdated
@@ -123,7 +123,7 @@ def remove_sgr(line): | |||
def remove_both(line): | |||
return pat.sub('', line.replace('\r', '')) | |||
|
|||
if as_ansi: | |||
if not as_ansi: | |||
return remove_both if add_wrap_markers else remove_sgr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't tell if the logic for add_wrap_markers
also needs to change.
86e507e
to
de265c8
Compare
de265c8
to
760e23e
Compare
As noted here: https://sw.kovidgoyal.net/kitty/pipe.html adding _wrap means that the output will have carriage returns in it. This is meant for programs that want to do wrapping themselves, typically when the screen they are writing to is of different size than the kitty window. If you want to pie to less in an overlay, dont use _wrap just use |
Ah! I missed that part of the documentation. That totally makes sense. Thanks for the awesome software! |
fixes #1642