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

The formatting for map f1 pipe @ansi overlay less +G -R is off on macos #1642

Closed
nerdrew opened this issue May 24, 2019 · 4 comments
Closed

Comments

@nerdrew
Copy link
Contributor

nerdrew commented May 24, 2019

Using kitty_mod+h to show_scrollback, my scrollback looks like:

Screen Shot 2019-05-24 at 09 43 13

Using f1 to pipe @ansi overlay less +G -R -n, my scrollback looks like:
Screen Shot 2019-05-24 at 09 43 02

@kovidgoyal
Copy link
Owner

Works for me, with:

kitty -o "map=f1 pipe @ansi overlay less +G -R -n"

@nerdrew
Copy link
Contributor Author

nerdrew commented May 27, 2019

Hmmm. I set my scrollback_lines to 200 before running the for i in $(seq 0 400); echo $i loop shown in the screenshot. As you can see, the syntax highlighting disappears in the pipe version, while it is visible in the show_scrollback version.

Also, there is consistently a missing newline at the first line outside of the current viewport.

Here's the prompt after running the for loop above:
Screen Shot 2019-05-27 at 14 45 36

Here's scrolling up 3 lines:
Screen Shot 2019-05-27 at 14 45 52

Is it possible that this is caused by something in my config or a mac only issue?

@Luflosi
Copy link
Contributor

Luflosi commented May 28, 2019

I can reproduce the issue with the missing newline but the text color works for me. I'm also using a Mac.
I'm starting kitty using kitty.app/Contents/MacOS/kitty --config NONE -o "map=f1 pipe @ansi overlay less +G -R -n". I scrolled two lines up.
type -a less outputs less is /usr/bin/less for me.
screenshot

kovidgoyal added a commit that referenced this issue May 28, 2019
@nerdrew
Copy link
Contributor Author

nerdrew commented May 28, 2019

To get the color issue, you need to have the scrollback go into the "pager" history, not the scrollback_lines. I used this to repro:

kitty -o "map=f1 pipe @ansi overlay tee boom.log" -o "scrollback_lines 100" --config NONE -o "scrollback_pager_history_size 100"

Then make sure you push the colorized text past the regular scrollback lines (hence the for loop in my example above).

nerdrew added a commit to nerdrew/kitty that referenced this issue May 28, 2019
nerdrew added a commit to nerdrew/kitty that referenced this issue May 28, 2019
nerdrew added a commit to nerdrew/kitty that referenced this issue May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants