mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-05 19:08:17 +00:00
gtk-ng: implement close_tab:other keybind (#8403)
This commit is contained in:
@@ -353,7 +353,7 @@ pub const Tab = extern struct {
|
||||
// a close-page signal that the parent can intercept.
|
||||
switch (mode) {
|
||||
.this => tab_view.closePage(page),
|
||||
.other => log.warn("close-tab:other is not implemented", .{}),
|
||||
.other => tab_view.closeOtherPages(page),
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -558,8 +558,6 @@ pub const Action = union(enum) {
|
||||
///
|
||||
/// If the mode is not specified, defaults to closing the current tab.
|
||||
///
|
||||
/// close-tab:other is only available on macOS.
|
||||
///
|
||||
/// This might trigger a close confirmation popup, depending on the value
|
||||
/// of the `confirm-close-surface` configuration setting.
|
||||
close_tab: CloseTabMode,
|
||||
|
@@ -393,27 +393,18 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.description = "Close the current terminal.",
|
||||
}},
|
||||
|
||||
.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_tab => comptime &.{
|
||||
.{
|
||||
.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.",
|
||||
},
|
||||
},
|
||||
|
||||
.close_window => comptime &.{.{
|
||||
.action = .close_window,
|
||||
|
Reference in New Issue
Block a user