Closed joshka closed 1 year ago
easy VHS repro:
Output bleed.gif
Set Width 500
Set Height 500
Set Shell zsh
Set TypingSpeed 1ms
Type "printf 'Test \033[0;31mTest\033[0;60m Test\033[0m '"
Sleep 2s
Enter
Type "printf 'Test \033[0;31mTest\033[0;103m Test\033[0m '"
Sleep 2s
Enter
Sleep 2s
renders:
but in Konsole (zsh) it renders as:
vhs currently seems to ignore \033[0m
(ansi reset), if the next character is a whitespace, see:
Installing the source version of ttyd which contains an updated xterm.js fixes the issue.
On a mac: brew install ttyd --HEAD
This is a duplicate of #249 (and several other issues) but I'd suggest to leave this or some other issue open until ttyd is updated (I've made a request for a release in https://github.com/tsl0922/ttyd/issues/1201).
The upstream of ttyd is updated now - which should make it possible to use the release version rather than the head version.
Describe the bug I'm trying to capture demos for Ratatui (a rust tui crate) and I'm seeing some discrepancy between what the terminal sees, what ttyd sees and what vhs captures. Particularly this is visible with backgrounds. https://github.com/tui-rs-revival/ratatui/pull/303 is an issue that highlights some of the problem.
Setup Please complete the following information along with version numbers, if applicable.
To Reproduce Steps to reproduce the behavior (on a machine with rust installed)
ttyd --interface 127.0.0.1 --port 11122 -t renderType=canvas -t disableResizeOverlay=true -t enableSixel=true -t customGlyphs=true --once zsh
and thencargo run --example=gauge
at http://localhost:11122Source Code Please include source code if needed to reproduce the behavior.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots iterm view:
vhs gif:
ttyd (in firefox):
Additional context Add any other context about the problem here. Our popup example has a similar issue (and several other examples did, but some changes have avoided the issue). It seems like something is not quite capturing the start / end of the set background commands correctly. I haven't done a minimal repro for this, but have at least narrowed the place the issue could be I hope.