core: add resize_split binding with default keys

On macOS, use Cmd+Ctrl+Arrow keys as default bindings for resizing by 10
points in the given direction.
This commit is contained in:
Gregory Anders
2023-11-05 19:50:58 -06:00
parent e7745dc820
commit 0a2d435481
4 changed files with 46 additions and 0 deletions

View File

@@ -179,6 +179,10 @@ pub const Action = union(enum) {
/// zoom/unzoom the current split.
toggle_split_zoom: void,
/// Resize the current split by moving the split divider in the given
/// direction
resize_split: SplitResizeParameter,
/// Show, hide, or toggle the terminal inspector for the currently
/// focused terminal.
inspector: InspectorMode,
@@ -227,6 +231,19 @@ pub const Action = union(enum) {
right,
};
// Extern because it is used in the embedded runtime ABI.
pub const SplitResizeDirection = enum(c_int) {
up,
down,
left,
right,
};
pub const SplitResizeParameter = struct {
SplitResizeDirection,
u16,
};
// Extern because it is used in the embedded runtime ABI.
pub const InspectorMode = enum(c_int) {
toggle,