mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-01 23:48:35 +00:00
macOS: implement cmd+[0-9] to goto tab
This is my attempt at fixing #63. It works! But: 1. The `NotificationCenter` subscription is triggered once for every open tab. That's obviously wrong. But I'm not sure and could use some pointers where else to put the subscription. That leads me to... 2. I'm _not_ knowledgable in Swift/AppKit/SwiftUI, so I might have put the wrong/right things in the wrong/right places. For example: wasn't sure what's to be handled in Swift and what's to be handled by the core in Zig. Would love some pointers :)
This commit is contained in:

committed by
Mitchell Hashimoto

parent
cb775b5d56
commit
6ff3f62e3a
@@ -74,6 +74,10 @@ extension Ghostty.Notification {
|
||||
/// Focus previous/next split. Has a SplitFocusDirection in the userinfo.
|
||||
static let ghosttyFocusSplit = Notification.Name("com.mitchellh.ghostty.focusSplit")
|
||||
static let SplitDirectionKey = ghosttyFocusSplit.rawValue
|
||||
|
||||
/// Goto tab. Has tab index in the userinfo.
|
||||
static let ghosttyGotoTab = Notification.Name("com.mitchellh.ghostty.gotoTab")
|
||||
static let GotoTabKey = ghosttyGotoTab.rawValue
|
||||
}
|
||||
|
||||
// Make the input enum hashable.
|
||||
|
Reference in New Issue
Block a user