diff options
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/builtins.zig b/src/builtins.zig index 0ad7d998..8a2c2f5f 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -1264,7 +1264,7 @@ pub const New = struct { pub const Newcol = struct { pub const scope: Scope = .session; pub fn run(c: Ctx) void { - c.p.newColumn(c.id); + layout.newColumn(c.p, c.id); } }; @@ -1413,7 +1413,7 @@ pub const Delcol = struct { // acme's Delcol refuses a column with unsaved text (exec.c delcol, // cols.c colclean), once: the next Delcol closes it. if (warnModifiedIn(c, .Delcol, .{ .column = col })) return; - c.p.removeColumn(col) catch |err| c.p.reportError(c.id, "close column", err); + layout.removeColumn(c.p, col) catch |err| c.p.reportError(c.id, "close column", err); } }; @@ -1536,7 +1536,7 @@ pub const Joincol = struct { pub const scope: Scope = .session; pub fn run(c: Ctx) void { // The keyboard's column joins the one to its right; the last has none. - const col = c.p.keyboardColumn(c.p.active) orelse return; + const col = layout.keyboardColumn(c.p, c.p.active) orelse return; if (col + 1 >= c.p.ncol) return c.p.reportFailure(c.id, "Joincol: no column to the right"); // As Newcol is refused: a column that could not give each pane its // tag and 2 rows would leave a layout `size` refuses as it is. @@ -1757,7 +1757,7 @@ pub const Down = struct { pub fn run(c: Ctx) void { if (c.p.header_focus) { const column = layout.findPane(c.p, c.id); - if (c.p.header_column == null and c.p.columnBarHeight() > 0) + if (c.p.header_column == null and layout.columnBarHeight(c.p) > 0) return tagline.enterHeader(c.p, if (column) |at| at.col else 0); // Onto the top pane of the column the header stands over. const col = c.p.header_column orelse if (column) |at| at.col else return; @@ -1779,7 +1779,7 @@ pub const Up = struct { return; } if (layout.focusDir(c.p, c.id, .up)) return; - if (c.p.columnBarHeight() > 0) { + if (layout.columnBarHeight(c.p) > 0) { if (layout.findPane(c.p, c.id)) |at| tagline.enterHeader(c.p, at.col); } else if (c.p.topBarHeight() > 0) tagline.enterHeader(c.p, null); } |
