mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-27 02:56:28 +00:00
macos: make move_tab work
This commit is contained in:
@@ -3916,7 +3916,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
||||
.move_tab => |position| try self.rt_app.performAction(
|
||||
.{ .surface = self },
|
||||
.move_tab,
|
||||
position,
|
||||
.{ .amount = position },
|
||||
),
|
||||
|
||||
.new_split => |direction| try self.rt_app.performAction(
|
||||
|
||||
@@ -101,9 +101,11 @@ pub const Action = union(Key) {
|
||||
toggle_visibility,
|
||||
|
||||
/// Moves a tab by a relative offset.
|
||||
/// Adjusts the tab position based on `offset` (e.g., -1 for left, +1 for right).
|
||||
/// If the new position is out of bounds, it wraps around cyclically within the tab range.
|
||||
move_tab: isize,
|
||||
///
|
||||
/// Adjusts the tab position based on `offset` (e.g., -1 for left, +1
|
||||
/// for right). If the new position is out of bounds, it wraps around
|
||||
/// cyclically within the tab range.
|
||||
move_tab: MoveTab,
|
||||
|
||||
/// Jump to a specific tab. Must handle the scenario that the tab
|
||||
/// value is invalid.
|
||||
@@ -314,6 +316,10 @@ pub const ResizeSplit = extern struct {
|
||||
};
|
||||
};
|
||||
|
||||
pub const MoveTab = extern struct {
|
||||
amount: isize,
|
||||
};
|
||||
|
||||
/// The tab to jump to. This is non-exhaustive so that integer values represent
|
||||
/// the index (zero-based) of the tab to jump to. Negative values are special
|
||||
/// values.
|
||||
|
||||
Reference in New Issue
Block a user