From 6f2d4160d1beb53a2bc591188411ef81bba58223 Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Mon, 30 Mar 2026 16:23:16 -0700 Subject: [PATCH 1/6] Update ghostty submodule to upstream sync (1,150 commits) Syncs manaflow-ai/ghostty fork with upstream ghostty-org/ghostty, rebasing 13 cmux patches onto latest upstream. Includes fix for click-after-tab-switch infinite scroll (issue 1199) via upstream ghostty-org/ghostty#11167. --- ghostty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostty b/ghostty index bc9be90a21..ee2595cae1 160000 --- a/ghostty +++ b/ghostty @@ -1 +1 @@ -Subproject commit bc9be90a21997a4e5f06bf15ae2ec0f937c2dc42 +Subproject commit ee2595cae16fbdf9d91e9c371fa1f63c189c59a1 From f2c44f35f2bd83424ef45aa6e5274b08f8dacff9 Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Mon, 30 Mar 2026 16:27:43 -0700 Subject: [PATCH 2/6] Fix OSC 99 parser for upstream ghostty API changes --- ghostty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostty b/ghostty index ee2595cae1..f2f7b140d0 160000 --- a/ghostty +++ b/ghostty @@ -1 +1 @@ -Subproject commit ee2595cae16fbdf9d91e9c371fa1f63c189c59a1 +Subproject commit f2f7b140d0b5b351df3d813346d25b60f9532661 From be0552e3d879f1633e2a5c1c9c3440b8517c1408 Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Mon, 30 Mar 2026 16:33:02 -0700 Subject: [PATCH 3/6] Add GhosttyKit checksum for upstream sync --- scripts/ghosttykit-checksums.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ghosttykit-checksums.txt b/scripts/ghosttykit-checksums.txt index 1e45a32adf..6fd43d96ce 100644 --- a/scripts/ghosttykit-checksums.txt +++ b/scripts/ghosttykit-checksums.txt @@ -8,3 +8,4 @@ c47010b80cd9ae6d1ab744c120f011a465521ea3 d6904870a3c920b2787b1c4b950cfdef232606b 312c7b23a7c8dc0704431940d76ba5dc32a46afb ae73cb18a9d6efec42126a1d99e0e9d12022403d7dc301dfa21ed9f7c89c9e30 404a3f175ba6baafabc46cac807194883e040980 bcbd2954f4746fe5bcb4bfca6efeddd3ea355fda2836371f4c7150271c58acbd bc9be90a21997a4e5f06bf15ae2ec0f937c2dc42 6b83b66768e8bba871a3753ae8ffbaabd03370b306c429cd86c9cdcc8db82589 +f2f7b140d0b5b351df3d813346d25b60f9532661 b1ae01a37932738c8e81d594a753f11002b5a8ef2158e13bfbb7ff8f159c54d9 From 097932e0e96d23fb71f9f5f459379569bdd88e5a Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Mon, 30 Mar 2026 16:39:20 -0700 Subject: [PATCH 4/6] Re-export ghostty_surface_clear_selection for cmux --- ghostty | 2 +- scripts/ghosttykit-checksums.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ghostty b/ghostty index f2f7b140d0..fa0769f3f5 160000 --- a/ghostty +++ b/ghostty @@ -1 +1 @@ -Subproject commit f2f7b140d0b5b351df3d813346d25b60f9532661 +Subproject commit fa0769f3f5d62971240798b3a6f16dd849b8f597 diff --git a/scripts/ghosttykit-checksums.txt b/scripts/ghosttykit-checksums.txt index 6fd43d96ce..33f49048dc 100644 --- a/scripts/ghosttykit-checksums.txt +++ b/scripts/ghosttykit-checksums.txt @@ -9,3 +9,5 @@ c47010b80cd9ae6d1ab744c120f011a465521ea3 d6904870a3c920b2787b1c4b950cfdef232606b 404a3f175ba6baafabc46cac807194883e040980 bcbd2954f4746fe5bcb4bfca6efeddd3ea355fda2836371f4c7150271c58acbd bc9be90a21997a4e5f06bf15ae2ec0f937c2dc42 6b83b66768e8bba871a3753ae8ffbaabd03370b306c429cd86c9cdcc8db82589 f2f7b140d0b5b351df3d813346d25b60f9532661 b1ae01a37932738c8e81d594a753f11002b5a8ef2158e13bfbb7ff8f159c54d9 +ce2181d52d6208f0bad8761c31e25dd68b5bb10f f75c6ddf111b6de49104e3cc993408a4f1273170f9424bf0391ad3a4b256c282 +fa0769f3f5d62971240798b3a6f16dd849b8f597 76253c2a644d881ebcc0a092908b3f5eec51375cd335e76ff5efbde220bb9a76 From 83c21993d1b13a36f059d296ac4dd2992c5a6bf2 Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Mon, 30 Mar 2026 17:10:16 -0700 Subject: [PATCH 5/6] Handle new GHOSTTY_ACTION_SET_TAB_TITLE from upstream --- Sources/GhosttyTerminalView.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Sources/GhosttyTerminalView.swift b/Sources/GhosttyTerminalView.swift index 0c3068b065..aae5b4b121 100644 --- a/Sources/GhosttyTerminalView.swift +++ b/Sources/GhosttyTerminalView.swift @@ -2592,6 +2592,24 @@ class GhosttyApp { } } return true + case ghostty_action_tag_e(rawValue: 33): // GHOSTTY_ACTION_SET_TAB_TITLE + let title = action.action.set_title.title + .flatMap { String(cString: $0) } ?? "" + if let tabId = surfaceView.tabId, + let surfaceId = surfaceView.terminalSurface?.id { + DispatchQueue.main.async { + NotificationCenter.default.post( + name: .ghosttyDidSetTitle, + object: surfaceView, + userInfo: [ + GhosttyNotificationKey.tabId: tabId, + GhosttyNotificationKey.surfaceId: surfaceId, + GhosttyNotificationKey.title: title, + ] + ) + } + } + return true case GHOSTTY_ACTION_PWD: guard let tabId = surfaceView.tabId, let surfaceId = surfaceView.terminalSurface?.id else { return true } From f204e84e9bc9d8b2aaefce051106cfd2d5f29b92 Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Mon, 30 Mar 2026 17:28:54 -0700 Subject: [PATCH 6/6] Fix action enum shift crash from upstream SET_TAB_TITLE Upstream added GHOSTTY_ACTION_SET_TAB_TITLE at position 33, shifting all subsequent enum values. Swift/Xcode couldn't import the new value, causing every action after position 33 to be misinterpreted (e.g. COMMAND_FINISHED matched as START_SEARCH, crashing on garbage pointer). Fix: move SET_TAB_TITLE to the end of the C ABI enum so existing values keep their positions. Handle it via raw value in Swift. --- Sources/GhosttyTerminalView.swift | 2 +- ghostty | 2 +- scripts/ghosttykit-checksums.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/GhosttyTerminalView.swift b/Sources/GhosttyTerminalView.swift index aae5b4b121..d67f2655db 100644 --- a/Sources/GhosttyTerminalView.swift +++ b/Sources/GhosttyTerminalView.swift @@ -2592,7 +2592,7 @@ class GhosttyApp { } } return true - case ghostty_action_tag_e(rawValue: 33): // GHOSTTY_ACTION_SET_TAB_TITLE + case ghostty_action_tag_e(rawValue: 64): // GHOSTTY_ACTION_SET_TAB_TITLE (moved to end to avoid shifting existing values) let title = action.action.set_title.title .flatMap { String(cString: $0) } ?? "" if let tabId = surfaceView.tabId, diff --git a/ghostty b/ghostty index fa0769f3f5..40c3dcd373 160000 --- a/ghostty +++ b/ghostty @@ -1 +1 @@ -Subproject commit fa0769f3f5d62971240798b3a6f16dd849b8f597 +Subproject commit 40c3dcd373c52894b96ab92dd17f4d35752a68d6 diff --git a/scripts/ghosttykit-checksums.txt b/scripts/ghosttykit-checksums.txt index 33f49048dc..2829137eed 100644 --- a/scripts/ghosttykit-checksums.txt +++ b/scripts/ghosttykit-checksums.txt @@ -11,3 +11,4 @@ bc9be90a21997a4e5f06bf15ae2ec0f937c2dc42 6b83b66768e8bba871a3753ae8ffbaabd03370b f2f7b140d0b5b351df3d813346d25b60f9532661 b1ae01a37932738c8e81d594a753f11002b5a8ef2158e13bfbb7ff8f159c54d9 ce2181d52d6208f0bad8761c31e25dd68b5bb10f f75c6ddf111b6de49104e3cc993408a4f1273170f9424bf0391ad3a4b256c282 fa0769f3f5d62971240798b3a6f16dd849b8f597 76253c2a644d881ebcc0a092908b3f5eec51375cd335e76ff5efbde220bb9a76 +40c3dcd373c52894b96ab92dd17f4d35752a68d6 51a31904092ab99fa395b10cb8bd96fd36a0b25bf8bf60bdbe65e8a99d9bc334