mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 14:00:29 +00:00
Add close tabs on the right action
This commit is contained in:
committed by
Mitchell Hashimoto
parent
894e8d91ba
commit
625d7274bf
@@ -600,9 +600,8 @@ pub const Action = union(enum) {
|
||||
/// of the `confirm-close-surface` configuration setting.
|
||||
close_surface,
|
||||
|
||||
/// Close the current tab and all splits therein _or_ close all tabs and
|
||||
/// splits thein of tabs _other_ than the current tab, depending on the
|
||||
/// mode.
|
||||
/// Close the current tab and all splits therein, close all other tabs, or
|
||||
/// close every tab to the right of the current one depending on the mode.
|
||||
///
|
||||
/// If the mode is not specified, defaults to closing the current tab.
|
||||
///
|
||||
@@ -1005,6 +1004,7 @@ pub const Action = union(enum) {
|
||||
pub const CloseTabMode = enum {
|
||||
this,
|
||||
other,
|
||||
right,
|
||||
|
||||
pub const default: CloseTabMode = .this;
|
||||
};
|
||||
|
||||
@@ -538,6 +538,11 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.title = "Close Other Tabs",
|
||||
.description = "Close all tabs in this window except the current one.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .close_tab = .right },
|
||||
.title = "Close Tabs on the Right",
|
||||
.description = "Close every tab to the right of the current one.",
|
||||
},
|
||||
},
|
||||
|
||||
.close_window => comptime &.{.{
|
||||
|
||||
Reference in New Issue
Block a user