Skip to content

Commit abc476c

Browse files
committed
Make Cmd+T always open a normal tab instead of splitting
Remove worktree tab interception from both the ghosttyNewTab notification handler and the newTab IBAction so Cmd+T creates a standard tab regardless of worktree tab settings.
1 parent 1555697 commit abc476c

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

macos/Sources/App/macOS/AppDelegate.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -874,14 +874,8 @@ class AppDelegate: NSObject,
874874
let configAny = notification.userInfo?[Ghostty.Notification.NewSurfaceConfigKey]
875875
let config = configAny as? Ghostty.SurfaceConfiguration
876876

877-
if WorktrunkPreferences.worktreeTabsEnabled, let root = controller.worktreeTabRootPath {
878-
var base = config ?? Ghostty.SurfaceConfiguration()
879-
base.workingDirectory = base.workingDirectory ?? root
880-
TerminalAgentHooks.apply(to: &base)
881-
882-
controller.openWorktreeTabNewSession(baseConfig: base)
883-
return
884-
}
877+
// Always create a normal tab, even when worktree tabs are enabled.
878+
// Worktree split behavior is handled separately.
885879

886880
_ = TerminalController.newTab(ghostty, from: window, withBaseConfig: config)
887881
}

macos/Sources/Features/Terminal/TerminalController.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,11 +1811,6 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
18111811
}
18121812

18131813
@IBAction func newTab(_ sender: Any?) {
1814-
if WorktrunkPreferences.worktreeTabsEnabled, let root = worktreeTabRootPath {
1815-
openWorktreeTabSession(worktreePath: root, baseConfig: Ghostty.SurfaceConfiguration())
1816-
return
1817-
}
1818-
18191814
guard let surface = focusedSurface?.surface else { return }
18201815
ghostty.newTab(surface: surface)
18211816
}

0 commit comments

Comments
 (0)