Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Programa is a fork of [cmux](https://github.com/manaflow-ai/cmux); for history p
- On Windows, pasting text with line breaks or control characters into a program that has not turned on bracketed paste (cmd.exe, PowerShell) asks first, with a preview.

### Changed
- A focused terminal that has nothing new to show uses about half as much CPU. It stops waking up on every screen refresh after a quarter second of quiet and starts again on the next change.
- Only one copy of Programa runs at a time: launching a second copy brings the running app forward and exits.
- Closing a window with its red button or Close Window asks first when any of its workspaces has a running process, with the same confirmation as closing the last workspace. The socket method `window.close` still closes without asking.
- Splitting a pane or opening a pane from the socket or CLI no longer moves focus; only explicit focus commands do.
Expand Down
33 changes: 28 additions & 5 deletions docs/ghostty-fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ When we change the fork, update this document and the parent submodule SHA.

## Current fork changes

The pinned fork head is `9d8aeccac` on the fork branch `osc7501-program-status`, which is
fork `main`'s `bccfc8333fecf707dd918d46e3849fc8ed72cca0` plus the OSC 7501 patch group. Never
delete that branch: the pin and its xcframework release point at it. It is built on
The pinned fork head is `617aac442` on the fork branch `idle-park-display-link`, which is
fork `main`'s `bccfc8333fecf707dd918d46e3849fc8ed72cca0` plus the OSC 7501 patch group and the
idle display link park. Never delete that branch: the pin and its xcframework release point at it. It is built on
`ghostty-org/ghostty` `main` at `c8634f3fce12f8189ed058e018195eb693f8562b` and Zig 0.16.0, and
carries the eleven patch groups below: display-link restart, resize stale-frame mitigation, OSC 99
carries the twelve patch groups below: display-link restart, resize stale-frame mitigation, OSC 99
notifications, theme picker hooks, color scheme mode 2031, keyboard copy mode selection API,
layer-background flag, occluded-surface throttle, offscreen renderer realization, session
introspection and revival APIs (which include the PTY tee), and OSC 7501 program status.
introspection and revival APIs (which include the PTY tee), OSC 7501 program status, and idle
display link parking.

Prebuilt framework for the pinned head:

Expand Down Expand Up @@ -189,6 +190,28 @@ tend to conflict together during rebases.
- `GHOSTTY_OSC_COMMAND_PROGRAM_STATUS` is 26 here and 28 upstream, because the pin lacks the
Kitty desktop notification and unknown-OSC commands. Take upstream's value on the next sync.

### 12) Idle display link parking

- Commits: `2076a6134` (renderer: park an idle display link until the next change),
`617aac442` (reset the idle timer under `draw_mutex`)
- Files:
- `src/renderer/generic.zig`, `src/renderer/Thread.zig`
- Summary:
- A focused, visible terminal ran its CVDisplayLink nonstop. Every vsync woke the render thread
for a `drawFrame` that found nothing to draw, about 1.2% of a core per focused terminal on an
Apple Silicon Mac.
- `drawFrame` notes each tick with nothing to draw and stops the link after 250ms of them.
`Thread.drawFrame` calls `resumeVsync` instead of `hasVsync`, which restarts a parked link when
the surface is visible and focused, so the change still draws on the next vsync rather than
without one.
- Restarting a parked link added about 4ms to that one draw on a bench. 250ms outlasts the gap
between keystrokes, so typing keeps the link running, and stays under the 600ms cursor blink,
so a blinking prompt still parks between blinks.
- Conflict notes:
- Upstream reworks `syncDisplayLink` and the vsync path in `Thread.drawFrame` from time to time.
Keep the `resumeVsync` call at the `!now` draw gate and the idle-timer reset wherever the link
starts.

## Upstreamed fork changes

### cursor-click-to-move respects OSC 133 click-to-move
Expand Down
2 changes: 1 addition & 1 deletion ghostty
1 change: 1 addition & 0 deletions scripts/ghosttykit-checksums.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ c25020f993597285a331a76dcd7c8a6345b7e360 7ada2bddb5a33026fa5ff255a3f5fb4cabd44a6
96316fc506f0015f6e8e3906b995e2c4aba23ebf 0f12f0d6dd920ccfa49789eae1018be314344797894ef0aae7db3e90fc27a441
bccfc8333fecf707dd918d46e3849fc8ed72cca0 26441b6e038523b9c6223bfbb73535a727d5c7c26c225326dc85122bda30881f
9d8aeccac8a76906864c684b340af09f29d13487 66ddf8bc25e53aef8d48cf75491a28882f57d0621ad6efae7060768e677c21d1
617aac44206e6a88761e4b3a253547e07b8870df a2be0acaeaa4740c6f8d27adbc7529d1a7318dd224250f25edfa773b28b1949f
Loading