diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 05:42:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 05:48:17 -0300 |
| commit | 8903d352237919455996831047017ae57f2a83ef (patch) | |
| tree | 9876a3597a55b0b5fc16e535c1edd44eaed71e11 /src/ninep | |
| parent | 29e6abf9ccb07b1c10997588e1cf4cfc1ed53021 (diff) | |
| download | pardes-8903d352237919455996831047017ae57f2a83ef.tar.gz pardes-8903d352237919455996831047017ae57f2a83ef.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/ctl.zig | 2 | ||||
| -rw-r--r-- | src/ninep/pane.zig | 3 |
2 files changed, 3 insertions, 2 deletions
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)) { |
