macos: new tab while a window is focused inherits

This commit is contained in:
Mitchell Hashimoto
2023-10-30 22:55:57 -07:00
parent ae104111d7
commit ecd7a17384
2 changed files with 6 additions and 1 deletions

View File

@ -152,6 +152,11 @@ class TerminalController: NSWindowController, NSWindowDelegate, TerminalViewDele
//MARK: - First Responder
@IBAction func newTab(_ sender: Any?) {
guard let surface = focusedSurface?.surface else { return }
ghostty.newTab(surface: surface)
}
@IBAction func close(_ sender: Any) {
guard let surface = focusedSurface?.surface else { return }
ghostty.requestClose(surface: surface)

View File

@ -100,7 +100,7 @@
<menuItem title="New Tab" id="uTG-Vz-hJU">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="newTab:" target="bbz-4X-AYv" id="cxO-CS-TJq"/>
<action selector="newTab:" target="-1" id="KoW-K7-hw5"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>