charmbracelet / charmbracelet/vhs
Add support for synchronized output to prevent tearing
- Dominant language
- Go
- Stars
- 20.9k
- Forks
- 474
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 2
Description
If I run an application which continuously sends large chunks of text + ANSI control sequences to stdout, I sometimes see the cursor jump to the middle of the rendering. The application is enabling mode 2026 and sending the end-of-frame sequences. VHS should track whether this mode is enabled and not re-render a frame until it sees the end-of-frame sequence.
More details available at https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
Contributor guide
Research direction
Start by tracing VHS's terminal rendering and ANSI control-sequence handling, then read the linked gist for the synchronized-output protocol. The change is complete when mode 2026 is tracked and frames are not re-rendered until the end-of-frame sequence is received; verify this with a continuously writing application that emits large text chunks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100