macOS: fix undo new tab will cause a crash
parent
7f0468f910
commit
3f20f153c5
|
|
@ -377,10 +377,15 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
|
|||
withTarget: controller,
|
||||
expiresAfter: controller.undoExpiration
|
||||
) { target in
|
||||
// Close the tab when undoing
|
||||
// Close the tab when undoing. We do this in a DispatchQueue because
|
||||
// for some people on macOS Tahoe this caused a crash and the queue
|
||||
// fixes it.
|
||||
// https://github.com/ghostty-org/ghostty/pull/9512
|
||||
DispatchQueue.main.async {
|
||||
undoManager.disableUndoRegistration {
|
||||
target.closeTab(nil)
|
||||
}
|
||||
}
|
||||
|
||||
// Register redo action
|
||||
undoManager.registerUndo(
|
||||
|
|
|
|||
Loading…
Reference in New Issue