split: add auto as split option

Add an `auto` split direction which splits along the larger direction.
This commit is contained in:
Tim Culverhouse
2024-02-04 21:08:44 -06:00
parent a000eef89e
commit 1824a0fe87
3 changed files with 21 additions and 5 deletions

View File

@@ -256,11 +256,11 @@ pub const Action = union(enum) {
application: []const u8,
};
// This is made extern (c_int) to make interop easier with our embedded
// runtime. The small size cost doesn't make a difference in our union.
pub const SplitDirection = enum(c_int) {
pub const SplitDirection = enum {
right,
down,
// splits along the larger direction
auto,
// Note: we don't support top or left yet
};