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

sixels printed inside terminal emulator does not get cleared #3173

Open
shadow-absorber opened this issue Feb 29, 2024 · 7 comments
Open

sixels printed inside terminal emulator does not get cleared #3173

shadow-absorber opened this issue Feb 29, 2024 · 7 comments

Comments

@shadow-absorber
Copy link

1. Graphical issue inside a terminal pane (eg. something does not look as it should)

  1. Delete the contents of /tmp/zellij-1000/zellij-log, ie with cd /tmp/zellij-1000/ and rm -fr zellij-log/ (/tmp/ is $TMPDIR/ on OSX)
  2. Run zellij --debug
  3. Run stty size, copy the result and attach it in the bug report
  4. Recreate your issue.
  5. Quit Zellij immediately with ctrl-q (your bug should ideally still be visible on screen)

Please attach the files that were created in /tmp/zellij-1000/zellij-log/ to the extent you are comfortable with.

Basic information

zellij --version: zellij 0.39.2

stty size: 52 208

uname -av or ver(Windows): Linux sam-computer 6.7.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 23 Feb 2024 16:31:48 +0000 x86_64 GNU/Linux

Further information

Reproduction steps, noticeable behavior, related issues, etc

after running img2sixel /path/to/png.png and then running the clear command the image does not get cleared from the screen
this is in the alacritty graphics branch that is working flawlessly outside of zellij

zellij.log

@shadow-absorber
Copy link
Author

just tested with xterm too and same issue with sixels not getting cleared when running clear command

@shadow-absorber shadow-absorber changed the title sixels printed inside alacritty sixel graphics fork does not get cleared sixels printed inside terminal emulator does not get cleared Mar 1, 2024
@manueldeprada
Copy link
Contributor

As @Zettexe pointed out in #3372 , this is probably a consequence of sixel images being rendered with twice the height they should. Example:

image

link to the test image

@lypanov
Copy link

lypanov commented Jul 18, 2024

As @Zettexe pointed out in #3372 , this is probably a consequence of sixel images being rendered with twice the height they should. Example:

image

link to the test image

Nice test case. I'll look into this issue next as it's breaking my sixel based workflow.

@manueldeprada
Copy link
Contributor

Weirdly enough, I recently switched to a branch of Alacritty with sixel support and there zellij's sixel are correct...

image

next week I got some time, I will investigate

@lypanov
Copy link

lypanov commented Jul 20, 2024 via email

@lypanov
Copy link

lypanov commented Jul 20, 2024

Yeah that's it, I was able to use wezterm record to show that zellij is not passing through the raster attributes needed to fix the default 2:1 ratio (spec default) that foot uses and other terminal emulators fail to correctly default to. Comment from Aram on the line in question: // we ignore pan/pad because (reportedly) no-one uses them. Alas some emulators are trying to get to spec on this. I'll look into writing a patch to pass this through from the tokenizer.

@lypanov
Copy link

lypanov commented Jul 22, 2024

Okay verified the theory by hacking sixel-image to always spew a hardcoded override to 1:1 ratio. Foot now renders your test case correctly. Next up will be to understand enough of the spec to add pan/pad roundtripping and understand how that fits into Aram's concerns.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants