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

Kitty images aren't scrolled with the text #4323

Open
mitchellh opened this issue Jan 1, 2025 · 0 comments
Open

Kitty images aren't scrolled with the text #4323

mitchellh opened this issue Jan 1, 2025 · 0 comments
Labels
vt Control sequence related

Comments

@mitchellh
Copy link
Contributor

Discussed in #4315

Originally posted by sergei-grechanik January 1, 2025
Images placed using classic placement commands do not follow the text when it's scrolled with CSI sequences. To reproduce, run this script with an image as the argument:

#!/bin/sh

IMG="$(realpath $1)"

printf '\033[100S' # Scroll up by 100
printf '\033[1d' # Move cursor to row 0
printf '\033[1G' # Move cursor to column 0

printf '========= Image ============\n'
printf '\033_Gi=1,t=f,q=1,f=100,a=T,r=10,c=20;%s\033\\' "$(printf '%s' "$IMG" | base64 -w0)"
printf '<- image\n'
printf '1\n'
printf '2\n'
printf '3\n'

sleep 1

printf '\033[4T' # Scroll down by 4
printf '\033[1d' # Move cursor to row 0
printf '\033[1G' # Move cursor to column 0

sleep 5

ghostty_bug_scroll.sh images/icons/icon_256.png when running from kitty (the expected behavior):
image

When running from ghostty:
image

@mitchellh mitchellh added the vt Control sequence related label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vt Control sequence related
Projects
None yet
Development

No branches or pull requests

1 participant