Closed veltza closed 7 months ago
I still have at least one more PR coming up. It has to do with resizing. I can't port it directly from st-sx, so I have to rewrite it.
I noticed that with st-sx + tmux images also disappear when the window is resized.
I also tried xterm enabling sixel support like this:
xterm -xrm "XTerm*decTerminalID: vt340" -xrm "XTerm*numColorRegisters: 256"
and sixel images also disappear there when you resize the terminal (but only when tmux is used), so I suspect that this may be an issue with tmux?
The resizing issue I'm working on has nothing to do with tmux. I will submit the PR tomorrow.
And speaking of tmux, it has very unreliable sixel support. Sixels may disappear when you resize or when you switch from the alternate screen to the main screen. It has nothing to do with the terminal.
Ah ok, so it is a different issue.
tmux is using the scrolling region and sequence to clear the screen below the shell prompt. This peculiar behavior caused the tscrollup() function to be called, which always scrolled the images regardless of whether they were inside the region or not. So the images moved out of place whenever the bottom of the screen was cleared. This fix checks that the images are inside the region before scrolling them.