Skip to content

Commit bab6de1

Browse files
authored
Merge pull request #13 from bvolpato-dd/bv/fix-addtabbedwindow-crash
[macos] restore addTabbedWindowSafely to fix tab crash
2 parents d15da28 + b06e59b commit bab6de1

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

macos/Ghostty.xcodeproj/project.pbxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@
254254
Helpers/PermissionRequest.swift,
255255
Helpers/Private/CGS.swift,
256256
Helpers/Private/Dock.swift,
257+
Helpers/ObjCExceptionCatcher.m,
257258
Helpers/TabGroupCloseCoordinator.swift,
258259
Helpers/TabTitleEditor.swift,
259260
Helpers/VibrantLayer.m,

macos/Sources/Features/Terminal/TerminalController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
890890
if #available(macOS 26, *) {
891891
if window is TitlebarTabsTahoeTerminalWindow {
892892
tabGroup.removeWindow(movingWindow)
893-
targetWindow.addTabbedWindow(movingWindow, ordered: .below)
893+
targetWindow.addTabbedWindowSafely(movingWindow, ordered: .below)
894894
relabelTabs()
895895
return
896896
}
@@ -899,7 +899,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
899899
NSAnimationContext.beginGrouping()
900900
NSAnimationContext.current.duration = 0
901901
tabGroup.removeWindow(movingWindow)
902-
targetWindow.addTabbedWindow(movingWindow, ordered: .below)
902+
targetWindow.addTabbedWindowSafely(movingWindow, ordered: .below)
903903
NSAnimationContext.endGrouping()
904904

905905
relabelTabs()
@@ -915,7 +915,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
915915
if #available(macOS 26, *) {
916916
if window is TitlebarTabsTahoeTerminalWindow {
917917
tabGroup.removeWindow(movingWindow)
918-
targetWindow.addTabbedWindow(movingWindow, ordered: .above)
918+
targetWindow.addTabbedWindowSafely(movingWindow, ordered: .above)
919919
relabelTabs()
920920
return
921921
}
@@ -924,7 +924,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
924924
NSAnimationContext.beginGrouping()
925925
NSAnimationContext.current.duration = 0
926926
tabGroup.removeWindow(movingWindow)
927-
targetWindow.addTabbedWindow(movingWindow, ordered: .above)
927+
targetWindow.addTabbedWindowSafely(movingWindow, ordered: .above)
928928
NSAnimationContext.endGrouping()
929929

930930
relabelTabs()

0 commit comments

Comments
 (0)