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:
Jeffrey C. Ollie
2025-08-25 11:00:26 -05:00
parent 8aa0b4c92a
commit 52a25e9c69
16 changed files with 168 additions and 87 deletions

View File

@@ -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,