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

fix: recognize TERM=rxvt-unicode-256color #1027

Merged
merged 1 commit into from
May 12, 2024
Merged

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented May 12, 2024

Fixes #1026.

I confirmed that cargo build --release && target/release/yazi and pressing q to exit no longer leaves characters on the next line.

target/release/yazi --debug >/dev/null still does, but I think that is intentional and fine. The --debug output contains:

...
Emulator
    Emulator.via_env: ("rxvt-unicode-256color", "")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect: Urxvt
...

According to https://www.arewesixelyet.com/#urxvt, SIXEL graphics format is not supported by this terminal emulator, but I wasn't sure how to determine whether Adaptor::Iterm2 would be supported.

@sxyazi
Copy link
Owner

sxyazi commented May 12, 2024

but I wasn't sure how to determine whether Adaptor::Iterm2 would be supported

Inline images protocol does not specify how to detect whether the terminal supports it, so it can only rely on the builtin database of the app. I believe urxvt does not support it since I did not find any information about it.

@sxyazi sxyazi changed the title Recognize TERM=rxvt-unicode-256color fix: recognize TERM=rxvt-unicode-256color May 12, 2024
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

@sxyazi sxyazi merged commit 07342a2 into sxyazi:main May 12, 2024
5 checks passed
@dtolnay dtolnay deleted the urxvt branch May 12, 2024 01:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exiting yazi leaves some ascii characters in terminal
2 participants