mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 07:16:12 +00:00
input: add focus split directional commands to command palette
This commit is contained in:
@@ -462,8 +462,10 @@ class BaseTerminalController: NSWindowController,
|
||||
}
|
||||
|
||||
// Move focus to the next surface
|
||||
DispatchQueue.main.async {
|
||||
Ghostty.moveFocus(to: nextSurface, from: target)
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func ghosttyDidToggleSplitZoom(_ notification: Notification) {
|
||||
// The target must be within our tree
|
||||
|
@@ -274,6 +274,39 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
},
|
||||
},
|
||||
|
||||
.goto_split => comptime &.{
|
||||
.{
|
||||
.action = .{ .goto_split = .previous },
|
||||
.title = "Focus Split: Previous",
|
||||
.description = "Focus the previous split, if any.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .goto_split = .next },
|
||||
.title = "Focus Split: Next",
|
||||
.description = "Focus the next split, if any.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .goto_split = .left },
|
||||
.title = "Focus Split: Left",
|
||||
.description = "Focus the split to the left, if it exists.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .goto_split = .right },
|
||||
.title = "Focus Split: Right",
|
||||
.description = "Focus the split to the right, if it exists.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .goto_split = .up },
|
||||
.title = "Focus Split: Up",
|
||||
.description = "Focus the split above, if it exists.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .goto_split = .down },
|
||||
.title = "Focus Split: Down",
|
||||
.description = "Focus the split below, if it exists.",
|
||||
},
|
||||
},
|
||||
|
||||
.toggle_split_zoom => comptime &.{.{
|
||||
.action = .toggle_split_zoom,
|
||||
.title = "Toggle Split Zoom",
|
||||
@@ -396,7 +429,6 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.jump_to_prompt,
|
||||
.write_scrollback_file,
|
||||
.goto_tab,
|
||||
.goto_split,
|
||||
.resize_split,
|
||||
.crash,
|
||||
=> comptime &.{},
|
||||
|
Reference in New Issue
Block a user