docs/ghostty-fork.md
This repo uses a fork of Ghostty for local patches that aren't upstream yet. When we change the fork, update this document and the parent submodule SHA.
ghostty/.manaflow-ai/ghostty.git add ghostty and commit the submodule SHA.Fork rebased onto upstream v1.3.0 plus newer main commits as of March 12, 2026.
a2252e7a9 (Add OSC 99 notification parser)src/terminal/osc.zigsrc/terminal/osc/parsers.zigsrc/terminal/osc/parsers/kitty_notification.zigc07e6c5a5 (macos: restart display link after display ID change)src/renderer/generic.zigsetMacOSDisplayID updates the current CGDisplay.a50579bd5 (Add C API for keyboard copy mode selection)src/Surface.zigsrc/apprt/embedded.zigghostty_surface_select_cursor_cell and ghostty_surface_clear_selection.Sections 3 and 4 are grouped by feature, not by commit order. The section 4 resize commits were applied earlier than the section 3 copy-mode commit, but they are kept together here because they touch the same stale-frame mitigation path and tend to conflict in the same files during rebases.
769bbf7a9 (macos: reduce transient blank/scaled frames during resize)9efcdfdf8 (macos: keep top-left gravity for stale-frame replay)pkg/macos/animation.zigsrc/Surface.zigsrc/apprt/embedded.zigsrc/renderer/Metal.zigsrc/renderer/generic.zigsrc/renderer/metal/IOSurfaceLayer.zig8ade43ce5 (zsh: use OSC 133 P for prompt redraws)src/shell-integration/zsh/ghostty-integrationOSC 133;A fresh-prompt mark for real prompt transitions.OSC 133;P markers for prompt redraws so async zsh themes do not look like extra prompt lines.0cf559581 (zsh: fix Pure-style multiline prompt redraws)312c7b23a (zsh: avoid extra Pure continuation markers)404a3f175 (Fix Pure prompt redraw markers)src/shell-integration/zsh/ghostty-integration\n%{\r%} to return to column 0 before the visible prompt line.main base after the older redraw fix drifted out during later submodule updates.The fork branch HEAD is now the section 6 zsh redraw follow-up commit.
0c52c987b (Add cmux theme picker helper hooks)build.zigsrc/cli/list_themes.zigsrc/main_ghostty.zigzig build cli-helper step so cmux can bundle Ghostty's CLI helper binary on macOS.+list-themes switch into a cmux-managed mode via env vars, writing the cmux theme override file and posting the existing cmux reload notification for live app-wide preview.app-runtime=none stdout path so the Ghostty CLI binary builds with the current Zig toolchain.The fork branch HEAD is now the section 7 cmux theme picker helper commit.
10a585754.bb646926f, so it is no longer carried as a fork-only patch.These files change frequently upstream; be careful when rebasing the fork:
src/terminal/osc/parsers.zig
std.testing.refAllDecls(@This()) in test {}.iterm2 import stays, and keep kitty_notification import added by us.src/terminal/osc.zig
src/shell-integration/zsh/ghostty-integration
OSC 133;A vs OSC 133;P split intact for redraw-heavy themes. Pure-style \n%{\r%}
prompt newlines should not get an extra explicit continuation marker after the hidden CR.src/cli/list_themes.zig
If you resolve a conflict, update this doc with what changed.