Synchronized Output
Command-line programs that update large swaths of the visible screen might show screen tearing on fast terminals like Ghostty, when synchronized output is not enabled.
On some systems, command-line programs that frequently update large swaths of the visible screen might repeatedly flicker or exhibit severe screen tearing when using Ghostty, which does not occur with other terminal emulators. This is usually not a bug with Ghostty, but rather a bug with the programs themselves.
Often the reason behind this is that Ghostty is rendering too quickly, and the programs that are redrawing the screen are not updating the cells on the screen fast enough to catch up with the renderer — hence, tearing.
There's not much Ghostty can do here without compromising performance, and therefore we highly encourage users of affected programs to file issues to upstream developers with a link to the "For developers" section of this page, so that they know how to fix the underlying problem.
Programs known to be affected by this include:
If you're a developer of a CLI or TUI-based app that has this issue, you need to implement the Synchronized Output protocol which signals Ghostty (and other modern, performant terminal emulators) when the screen has been fully updated, and it is safe to render the next frame.
However, as a best practice we also recommend only updating the cells that absolutely need to be updated, and avoid erasing whole rows or the entirety of the active screen before updating new cells. Instead, you can reset the cursor to the part to be updated by using Cursor Position (CUP), update the cells, and erase the rest of the line using Erase in Line (EL). This not only ameliorates the screen tearing on terminals that may not support the Synchronized Output protocol, but can also greatly increase performance by reducing needless updates and the amount of data sent to the terminal.