diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 02:44:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 0a75f3f333e795e741c83c1193e3b833d40caf46 (patch) | |
| tree | ce627350732398e3dc071495742693c271855f86 /src/ninep | |
| parent | 757cdaa826131dc5ff2d3ff0b270b8abe041c81a (diff) | |
| download | pardes-0a75f3f333e795e741c83c1193e3b833d40caf46.tar.gz pardes-0a75f3f333e795e741c83c1193e3b833d40caf46.zip | |
plumber: the pager sends (docs/next-plumber.md, phase 4): a +Pager filled with a diff (File.looksLikeDiff, pager_diff) is a plumbing message, as acme's `plumb -i` sends what it shows: fillPager's last call is Plumb.paged, which sends src pager, dst edit, wdir the +Pager's directory, type text/x-diff, `action=showdata filename=<the +Pager's name>` (quoted as mesg.c quotes), the text as data; the default rules' last set makes it showdiff (attr delete action, attr add action=showdiff, plumb to edit), and the edit port's showdata and showdiff (Plumb.show, acme's plumbshow) show the data in the pane filename names, the sender's own first, else a new clean pane of that name, showdiff then restacking it in a +Diff in its place (hunks.paged, the code the pager's hook called, unchanged); text paged that is no diff is not sent, where the record had every page sent: the look rules would read it whole, `type is text` holding (a `matches` over a MiB of output, up to the regular expressions' 300 ms budget, at each page), and a page of one line naming a file would ask the disk; the rules in force are read once and kept until their text changes (Plumb.parsed, by its hash, derived state: each process's own), measured in a fast build per send: 29k instructions to read the default rules, a URL's send 37k before, 8.3k after, a word's look 69k before, 40k after, a look that opens a file 262k before (its send 63k), 233k after (34k); test: a diff paged is stacked by the default rule, text that is no diff stays a +Pager, without the rule the +Pager stays as text, and another sender's showdata and showdiff; the design record gains what phases 2-4 did otherwise (detached starts with no output kept, only diffs paged sent, own ports asking nobody, the rules read once); plumber.zig's defaults end with the paged rule; the reference, the default rules' file and the changelog say so
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/ctl.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 7cdd3327..ffd29b4e 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -718,7 +718,7 @@ pub fn fillPager(p: *Pardes, serial: u32, held: *std.ArrayList(u8)) error{OutOfM panes.File.setContent(p, f, page.text); f.pager_spans = page.spans; f.saved_revision = f.revision; - if (f.pager_diff) @import("../hunks.zig").paged(p, id); + pardes.Plumb.paged(p, id); } /// The editor's step: the text of /pager opens closed unread goes in. |
