mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-23 05:10:41 +00:00
parameterize close_tab
- Add mode (`this`/`other`) parameter to `close_tab` keybind/apprt action. - Keybinds will default to `this` if not specified, eliminating backward compatibility issues (`keybind=x=close_tab` === `keybind=x=close_tab:this`). - Remove `close_other_tabs` keybind and apprt action.
This commit is contained in:
@@ -375,12 +375,6 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.description = "Show the on-screen keyboard if present.",
|
||||
}},
|
||||
|
||||
.close_other_tabs => comptime &.{.{
|
||||
.action = .close_other_tabs,
|
||||
.title = "Close Other Tabs",
|
||||
.description = "Close all tabs in this window except the current one.",
|
||||
}},
|
||||
|
||||
.open_config => comptime &.{.{
|
||||
.action = .open_config,
|
||||
.title = "Open Config",
|
||||
@@ -399,11 +393,27 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.description = "Close the current terminal.",
|
||||
}},
|
||||
|
||||
.close_tab => comptime &.{.{
|
||||
.action = .close_tab,
|
||||
.title = "Close Tab",
|
||||
.description = "Close the current tab.",
|
||||
}},
|
||||
.close_tab => comptime if (builtin.target.os.tag.isDarwin())
|
||||
&.{
|
||||
.{
|
||||
.action = .{ .close_tab = .this },
|
||||
.title = "Close Tab",
|
||||
.description = "Close the current tab.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .close_tab = .other },
|
||||
.title = "Close Other Tabs",
|
||||
.description = "Close all tabs in this window except the current one.",
|
||||
},
|
||||
}
|
||||
else
|
||||
&.{
|
||||
.{
|
||||
.action = .{ .close_tab = .this },
|
||||
.title = "Close Tab",
|
||||
.description = "Close the current tab.",
|
||||
},
|
||||
},
|
||||
|
||||
.close_window => comptime &.{.{
|
||||
.action = .close_window,
|
||||
|
||||
Reference in New Issue
Block a user