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

sixel preview writes out of bounds #1765

Open
andy29485 opened this issue Jun 28, 2024 · 1 comment
Open

sixel preview writes out of bounds #1765

andy29485 opened this issue Jun 28, 2024 · 1 comment

Comments

@andy29485
Copy link

My preview script outputs sixels (using chafa) and sometimes helper text after the sixel image with extra metadata (album art + song info for music, thumb + streams info for videos, etc...). Prior to r32 sixel wasn't supported (thanks for adding it btw!), so I used the lf-sixel fork (which had it's own set of bug, but supported my previews).

To reproduce set your preview script to (doesn't matter what the image is):

chafa -f sixel example.png
echo hello # any text here will do

Example of the problem (ignore the fact that the file isn't selected, I switched windows to take the screenshot):
r32

Expected result (using lf-sixel):
r30-lf-sixel

@catthegirl
Copy link

I looked through nav.go where the preview function is defined to see if I could help figure out your issue. I think what's going on behind the scenes is that the output since the previewer output starts with the sixel prefix the entire output is being rendered as though it were a part of the image rather than using the normal text rendering. It seems like lf and lf-sixel use an entirely different approach to sixel and that's why it works as expected on lf-sixel. Btw sorry if this isn't too helpful, I'm very inexperienced with open source contributions.

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

No branches or pull requests

2 participants