From 8903d352237919455996831047017ae57f2a83ef Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 05:42:57 -0300 Subject: layout: exec.placeNew moves into layout.zig as layout.placeNew, with NewPane, the type only it switches on, and acmeColumn and columnOf, which only it calls, before canSplitCol, since 29 of its 41 references are layout's own (acmePlace, takeRoom, splitTallest, placedRoomy); callers name layout, and Dir, mini and Store, which imported exec for it alone, import layout instead Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/ninep/ctl.zig | 2 +- src/ninep/pane.zig | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ninep') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index dc66663e..699b7833 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -1569,7 +1569,7 @@ test "a builtin for one kind of pane is refused on another, and still acts on it // A picture shown: the core's art words follow the kind's prefix. const doc = try pardes.Kind.open(p, id, pardes.Kind.test_kind.of(p), "/tmp/pardes-pic.ppm", "P6\n1 1\n255\n\x01\x02\x03"); while (p.nextEffect()) |e| p.perform(e); - pardes.exec.placeNew(p, 0, 0, id, .doc); + pardes.layout.placeNew(p, 0, 0, id, .doc); _ = try p.render(p.scratch.allocator()); const r = wr(p, Node.of(doc.serial, .ctl), "Mode\n"); try testing.expectEqualStrings("Mode: only a text or terminal pane has modes", r.reply.ename); diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig index b77d72d7..bb15b016 100644 --- a/src/ninep/pane.zig +++ b/src/ninep/pane.zig @@ -5,6 +5,7 @@ const std = @import("std"); const pardes = @import("../pardes.zig"); const tagline = @import("../tagline.zig"); const exec = @import("../exec.zig"); +const layout = @import("../layout.zig"); const look = @import("../look.zig"); const panes = @import("../panes.zig"); const modal = @import("../modal.zig"); @@ -927,7 +928,7 @@ pub fn appendErrors(p: *Pardes, id: usize, text: []const u8) ?usize { p.gpa.free(content); return null; }; - exec.placeNew(p, id, id, free, .errors); + layout.placeNew(p, id, id, free, .errors); // No column had room for it (it closes at the step's end): the text is // logged instead, a msg a line, so it is not lost and nothing fails. if (p.unplaced.isSet(free)) { -- cgit v1.3