summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* +171 -73 lib: the tree-sitter walks run in the library on a parse its caller ↵Gabriel Schneider29 hours
| | | | | | | hands in (docs/next-editor.md): `key(a, syn, k)` and `run(a, syn, act)` take a `?*Syntax`, which keeps the grammar it parses in, the tree, made on the first walk after the text changes, and helix's object_selections (Alt-o's history, for Alt-i to go back the way it came) in the page allocator; with one, Alt-o, Alt-i, Alt-n, Alt-p, Alt-a, Alt-I, Alt-e, Alt-b and `]f` and kin run in the library, and `mif` and kin find the grammar's textobjects; without, they come back as actions, as before; normal.nodeTree is the parse they read, a file's (fileTree) in pardes and the one handed in in the library, `Editor.Tree` its tree, path and history, so nodeSelect and objectJump take the editor's context and are textAction's, textRole saying the walks are the text's with a parse at hand, and edit.textobjectSelect reads it too; NodeStep moves to Editor.zig (File.zig names it); nothing a pane does changes; hxlib hands each case a parse with no grammar (a case's text has none): 538 of 658 compared with 0 mismatches (expand_node's one case moved from the caller's), --parity 618 of 738 with 0 mismatches; test/lib: Alt-o and Alt-i on C, back the way they came, `maf` from a textobjects query handed in, and Alt-o without a parse the caller's; core-test 811 of 950, shell-test 990 of 993, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass, lib-test pass Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* docs: the text pane as a library, as built (docs/next-editor.md): the calls, ↵Gabriel Schneider29 hours
| | | | the flat form's fields and capacities, what is refused at capacity and what a ring drops, the numbers (a key at 1, 16 and 64 KiB in Debug and ReleaseFast, the pages a typed character changes, a full parse, what a package taking the editor pays to compile, pardes's recompile, perf cells and codeloc before and after), the seam's compile-time branches, the hxlib counts, what is left out and why, and the recipe for an editor in a sketch; building.typ's library section gains the editor, how a package asks for it, its calls and `zig build hxlib`; the changelog says so
* hxlib: hxdiff's cases on the library, against helix's goldens and against ↵Gabriel Schneider29 hours
| | | | the file pane (docs/next-editor.md, R6): test/hxlib.zig types each case into a `pardes-editor` value and prints its result as hxdiff prints a pane's, doing what an app does with the s, S, K and Alt-K it is handed back (the keys to <ret> its pattern, <esc> no answer) and printing a case that reaches any other action (a view, n and N, a macro, gw) as the caller's; hxdiff takes another driver's results (`--actual=`), and `zig build hxlib` (`-- --parity`) holds them to the goldens or the file pane; the key notation is test/hxkeys.zig, which both harnesses read; what the cases found, fixed: paneCursorLines gave the library's body no lines (mm, mi, ma, md, mr, insert-mode arrows), and the library's selectRegex keeps its pattern in `/` as pardes's prompt does (look.submitSearch); a page key in insert mode moves a view and is the caller's; test/lib's `zig build bench -- <KiB> <keys>`: a key's cost, the pages it changes, a parse; hxlib 537 of 658 compared with 0 mismatches (5 waived as for pardes, 121 the caller's), --parity 617 of 738 with 0 mismatches and 0 waived; hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, core-test 811 of 950, shell-test 990 of 993, replicas pass, lib-test pass
* lib: the text pane as a library, `pardes-editor` (docs/next-editor.md, R5): ↵Gabriel Schneider29 hours
| | | | src/lib_editor.zig is an editor a program keeps as plain data (`Editor(capacity)`: a gap buffer for the text, Text's cursor fields by name, two byte rings of whole-text snapshots for undo and redo, registers as records; no pointer, no allocator), thawed into a Text and Registers in the allocator a call is handed, run through normal.zig and edit.zig as a pane's keys run, and frozen back, a key that does not fit refused whole (`key`, `run`, `selectRegex`, `setText`, `setRegister`; `Outcome` done, pending, unbound, action, refused), and `Syntax`, a parse derived from a grammar handed in; the seam is `pardes_config.lib`, true in the library's build alone: Text.pane is null at compile time there, a body's characters and undo are its own (flatSurface, editText, setEditTextSpan, pushUndo, undoStep), bodyFile and filePane are none, Esc and `*` do the text's part only and `+` is a plain register, and config.zig's check of the builtins' leader paths is the editor's; normal.textKey is the mode dispatch keys.zig and the library share, handleNormal hands back the parse and runAction runs an action across the ranges, and applySelRegex's search over the ranges is selectByRegex, which the library calls with a pattern; build.zig: `lib` in the options, mvzr's patch and uucode as functions (patchedMvzr, uucodeModule) the editor's module takes too, editorModule, and `library` exports `pardes-editor` to a package that asks (`.editor = true`: it fetches uucode, mvzr and vaxis, of which it compiles the grapheme width), so a pardes-syntax consumer fetches what it did; test/lib: a value typed into, copied elsewhere and its memory gone, types on equal to one never moved, undo past the ring and redo back, a text that does not fit refused with the value unchanged, an action handed back and a regex done by the caller, a language handed in parsed and coloured; core-test 811 of 950, shell-test 990 of 993, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass, lib-test 8 of 8
* syntax: a grammar handed in at run time, beside the compiled-in table ↵Gabriel Schneider29 hours
| | | | (docs/next-editor.md, R4): `Language` is a program's own (a sketch's DSL: its tree-sitter language, its highlights, textobjects and indents sources, told by an extension), `addLanguage` puts it among the grammars a path's extension finds and `forgetLanguages` drops it with its parser and queries (before the code it points into is unloaded); one `byExt` finds a grammar for forExt, supportsPath and specFor where each looped the table itself, a Spec's language is its function or the pointer handed in (`langOf`), and stop drops each spec through the same dropSpec; test: a grammar handed in colours and walks as the compiled-in one; core-test 811 of 950, the syntax snapshots byte-identical
* normal: a normal-mode action splits into the text's roles and the core's ↵Gabriel Schneider29 hours
| | | | (docs/next-editor.md, R2, third slice): textAction takes `e: Editor` and does the 58 roles of the text alone (motions, selections, edits, undo, registers, Esc's and `*`'s own part), textRole says which those are, and executeNormalAction keeps the 34 that reach past the text (views, builtins, prompts, LSP, the look ring, jump labels, macros), handing the rest over; replaySels, handleNormal, searchStep and searchSelection take the context, keys.zig hands `p.editor()`; nothing a key does changes; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass
* edit: the edits of a text take the editing context (docs/next-editor.md, R2, ↵Gabriel Schneider29 hours
| | | | second slice): enterInsert, exitInsert, handleInsert, insertKey, insertEdit, insertTab, pasteRegister, pasteText, normalDelete, normalYank, normalChange, deleteSelection, setEditCells, normalReplaceChar, chordReplace, replaceWithText, normalCase, normalJoin, normalRotateContents, normalAlign, normalIndent, normalToggleComment, normalAdjustNumber, addNewline, textobjectSelect and the three surrounds take `e: Editor`; insertEdit's splice end is `stop` and a comment extension `x` where they were `e`; 71 calls in 8 files hand `p.editor()`; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass
* edit: the routing of a text's characters takes the editing context ↵Gabriel Schneider29 hours
| | | | (docs/next-editor.md, R2, first slice): flatSurface, editText, editTextEol, setEditText, setEditTextEnd, setEditTextSpan, paneCursorLines, paneByteAtDisplay, pinPaneCursor, paneWrapWidth, treeIndent, pushUndo, undoStep, stepOwn, selText and vselText take `e: Editor` where they took `*Pardes`, the pane they route to reached through `e.p`; 149 calls in 16 files hand `p.editor()`, nothing else changes; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass
* Editor: what an edit of a text runs with, out of Pardes ↵Gabriel Schneider29 hours
| | | | (docs/next-editor.md, R1): src/Editor.zig is a context of the allocators and pointers to the registers, the register the running command names, the replay's multi_* and the retired text, and the core (`p`), gathered per call by `p.editor()` from where they are, so no field of Pardes or its view moves and a dump crosses builds as before (an embedded `ed: Editor` would have renamed `registers` in the dump, matched by name, and lost them at an Upgrade); setYank, registerValue, retireEditText and normal.multiOnce take it, their callers hand `p.editor()`; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass
* docs: the terminal out of the core, as built: docs/next-terminal.md gains ↵Gabriel Schneider29 hours
| | | | Phase 1 as built (the ops a compile-time constant and why, the table, Term.State a struct around the handle and the dump's type name, echo back in the core, the draw group as plain data with the diff colours beside it, the no-terminal core with no boot message and why, the test split by its counts), its not-verified list loses what is now known; building.typ says what core-test, shell-test and term-test build and run, and the term and plain modules; the changelog's entry says the terminal is a module of its own and what core-test and shell-test are
* terminal: the function keys' table written out: `comptime` built it with ↵Gabriel Schneider29 hours
| | | | std.fmt.comptimePrint("f{d}") a key, 25 calls of an inline function, never memoized, in every compile of the terminal (about 0.1e9 of the compiler's instructions, by the walker's measure of comptimePrint); it is the 25 tags in one line, the same table; nothing else changes
* ansi: the command pane's diff colours beside the terminal's ↵Gabriel Schneider29 hours
| | | | (docs/next-terminal.md, Phase 1; reports/diff-module.md, question 3, the user: "keep it but make it close in code to the pager so they're together"): File.DiffOutput and File.recolorDiffOutput move, as they are, from File.zig to src/ansi.zig, where the terminal's painted cells are laid over the body, so the colours a finished command pane's diff is given sit beside the colours its program gave it; body_layer calls ansi.recolorDiffOutput after ansi.recolor as it called File's; File.synStyle and File.SynStyle become pub for it (File's own recolorSyntax still the other caller); Core's diff_output is an ansi.DiffOutput; nothing else changes; core-test 810 of 949 (139 skipped), process-test's diffview and diffstack goldens unchanged (the suite's other failures the base's: lspcomplete, lspcompletemoved; exec once under load, passing on its retry)
* Term: a core without a terminal boots to a scratch pane, and a test skips ↵Gabriel Schneider29 hours
| | | | only where it needs a terminal (docs/next-terminal.md, Phase 1, the no-terminal core): Pardes.init's shell boots (.shell, .classic, .tty, .tty_shell) are one scratch pane when Term.ops is null, so a test that booted a shell for convenience runs on it, where every one of them skipped before (Term.open refused with SkipZigTest under a test); Term.open refuses with error.NoTerminal, said by errorWords as Term.none, so Term and an exec no shell can take (a command pane) refuse in words (`Term: no terminal in this build`, `exec: ...`), and takesCommandLine is false with no terminal pane; a +Pager pages the bytes as they are (Term.page, unchanged); no boot message: the no-terminal core is a test build alone, read by no person, and a message at boot put seven core tests (the message log, the notice bands, the Del question's wake, a press on a column's rule) out of core-test; a test that fails for want of a terminal says so on its first line (`if (pardes.Term.ops == null) return error.SkipZigTest; // a shell`: a shell, a command pane, the classic boot's three shells, it reads the emulator, ...), 99 tests in 25 files, and ninep/testing.zig's withTerm, the fixture of 29 that assert a terminal pane, once; each attributed by its failure on the scratch boot (NoTerminal from newShell or newCommand, a shell's pane, prompt, pty bytes or tag asserted, the classic boot's panes indexed) and by reading its body; no assertion changes; test: Term.zig ends with the no-terminal core's three (each boot a scratch pane and no terminal; Term, newShell and an exec refused in words, no line typed at a shell; a program's output paged as plain text); core-test (no terminal) 411 passed / 535 skipped of 946 to 810 passed / 139 skipped of 949, shell-test 992: 989 passed, the three no-terminal tests skipped
* integration: the terminal a module of its own, with the plumber whole and ↵Gabriel Schneider29 hours
|\ | | | | | | | | | | | | | | | | the walker's cheaper compile A merge of term-phase1a and pardes-next, no conflicts. core-test (the core with no terminal) 411 passed, 535 skipped of 946; shell-test (the same tests, the terminal compiled in) 989/989, on tui. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| *-. integration: the plumber whole and the walker's cheaper compile, with the ↵Gabriel Schneider29 hours
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | terminal behind src/Term.zig A merge of pardes-next, plumber and walk-fix. Only the changelog conflicted: both sides' entries kept, and the first plumber entry's "A look does not ask it yet" dropped, a look asking it now. core-test 990/990 on tui; behaviour-test 269/273 (the four addon ABI tests the base fails); the look, diff, pager and tree process cases pass, goldens unchanged; replicas pass. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | | * walk: the tape's shape appends each piece whole: `out = out ++ name ++ ":" ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | ++ shapeOf(F) ++ ","` is ((out ++ name) ++ ":") ++ ..., so the shape so far (up to 11 KB, every union arm and struct field of the tape's types) was copied at comptime once a piece, four times a field, and a comptime copy is costly (32 KB built of 4,000 appends: 226e9 of the compiler's instructions); the piece is put together first and appended once, in shape (each type's line), an enum's values, a struct's and a union's fields; the shape is the same 10,960 bytes and wire.semantics the same 05b2cba8834b1d7c; core-test's forced full recompile (Debug, one filter) 103.41e9 to 101.37e9 instructions (-1.7 % of the base's 120.12e9; all five changes together -15.6 %, 15.5-16.1 s of CPU to 13.6-14.4 s, and 9.0-9.2 s wall against 10.2-11.0 s, both noisy), the Debug test's text unchanged; a session's byte dump, its image and a closed pane's save the same bytes (but the clock's) and each build loads the other's; the changelog says so
| | | * walk: the tape's shape writes its numbers with decimal, not comptimePrint: ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | shapeOf wrote each integer's and float's width, each enum value and each array's length with std.fmt.comptimePrint, an inline function and so never memoized, about 5e6 of the compiler's instructions a call and some 600 calls (354 integers, 220 enum values) in every compile of the core; decimal writes `n` as {d} does, memoized, in five lines; the shape is the same 10,960 bytes and wire.semantics the same 05b2cba8834b1d7c; core-test's forced full recompile (Debug, one filter) 104.95e9 to 103.41e9 instructions (-1.3 % of the base's 120.12e9), the Debug test's text unchanged; a session's byte dump, its image and a closed pane's save the same bytes (but the clock's) and each build loads the other's; test: decimal against {d} for 0 to maxInt(u128) and minInt(i128); core-test 985 of 985; the changelog says so
| | | * wire: semantics joins the dependencies and the tape's shape on, not formats ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | them: the string it hashes ended in config.deps (2.5 KB) and tape.shape (11 KB) given to comptimePrint as {s}, and comptimePrint (an inline function: never memoized) formatting 13.5 KB at comptime was about 5 % of a compile of the core (a lone comptimePrint of the shape alone: 4.8e9 of the compiler's instructions); they are joined on with ++, so the string, and its hash, are the same bytes; core-test's forced full recompile (Debug, one filter) 110.75e9 to 104.95e9 instructions (-4.8 % of the base's 120.12e9), the Debug test's text unchanged (81.48 MB); semantics 05b2cba8834b1d7c before and after, the tape's shape the same 10,960 bytes, a session's byte dump, its image and a closed pane's save the same bytes (but the clock's) and each build loads the other's; core-test 984 of 984; the changelog says so
| | | * walk: one byte-dump reader for every root set: Load(roots)'s methods never ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | named the root set but to compare its table with the dump's, yet each set (the session's, a closed pane's, a terminal's Parts, a kind's SlotRecord, Handover's Carried) compiled its own copy of them all (Load(Pane) alone 0.88 MB of Debug code); they are Loader's, a struct of its own, whose init is told this build's table, and Load(roots) is its init with the set's table, so every caller reads as before; a move, the methods' text the same but one level less indented and init's comparison (`jj diff -w` shows it); core-test's forced full recompile (Debug, one filter) 112.95e9 to 110.75e9 instructions (-1.9 % of the base's 120.12e9), the Debug test's text 82.82 MB to 81.48 MB; a session's byte dump, its image and a closed pane's save are the same bytes before and after (but the clock's), each build loads the other's with no note and the same digest, wire.semantics and the tape's shape unchanged; core-test 984 of 984; the changelog says so
| | | * walk: a load's note on a field is written from the names at run time: Load's ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | and Get's three notes on a field (its kind changed, its default taken or left as it was; not in the dump) passed .{ @typeName(T), field }, a tuple of comptime strings, so `note` and std's print under it were compiled once a type, field and message (2,506 instances of note, 2,225 of Writer.print); noteField takes the two names as run-time strings and is one instance a message; the notes' text is the same, byte for byte; core-test's forced full recompile (Debug, one filter) 120.12e9 to 112.95e9 instructions (-6.0 %), generic instances 19,383 to 14,799, the Debug test's text 85.84 MB to 82.82 MB; a session's byte dump, its image and a closed pane's save are the same bytes before and after (but the clock's), each build loads the other's with no note and the same digest, wire.semantics and the tape's shape unchanged; the changelog says so
| | * | plumber: the pager sends (docs/next-plumber.md, phase 4): a +Pager filled ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | 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
| | * | plumber: external ports (docs/next-plumber.md, phase 3): every port a rule ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | names has a file, plumb/<port> (0444), listed after rules and send in the order rules named them and never dropped (Plumb.ports, dumped: seeded at boot from the rules in force, grown by each apply, refused past 32), its node a third family in the tree beside panes and columns (Node.ofPort, Target.port; port_bit is 1 << 40, clear of the host tree's and the archive's high bits, which 1 << 57 hit); an open reads (Open.what.port, an events.Queue of its own, 64 KiB): the messages sent from then on, packed, one a read, a short read the front and the next the rest, a read with none held until one comes (p.fs.news, answered by the listener as event reads are); every open gets its copy (fanOut, plumber(4)'s queuesend), one over the queue is not sent to it and the log says so; a port pardes reads itself (edit, web, a loaded kind) hands its readers copies without asking anyone, so a look stays speculated whole; another port's readers are the authority's to know, asked through tape.authority (a replica's own look waits for the first answer and guesses the last), with none its rule set's start runs, or its client, the message held in p.fs.plumb_held for the port's first opener (Plumb.opened, plumber(4)'s queueheld); test: plumber.zig, two opens of plumb/edit each read a look's message while the file opens, an open made after reads nothing, a client's message reaches the first opener and the next goes to the reader with nothing started, a port is not written; monkey9p.zig gains the plumb/ files, rules and messages that start no program, the ports' reads as held reads, and plumb/rules' rest read at the close (whose refusal is the log's alone, as a line file's: restAtClose); replicas.zig: a look to a port a program reads, the second of a replica's own speculated whole and confirmed, digests equal; tree.zig's readdir test lists web and edit; the reference's tree and plumber section, fs-help and the changelog say so
| | * | plumber: a look sends what it looks at (docs/next-plumber.md, phase 2): ↵Gabriel Schneider29 hours
| | |/ | | | | | | | | | after the pane's own readings and once a name already open in a pane is focused (never sent), lookAt sends the trimmed name, type text, src pardes (term from a raw terminal, a kind's name from its pane), wdir the pane's directory, with what resolveLookTarget found of it (Plumb.Seen: isfile and isdir take it, so no second stat and Look's own readings of a URL or `//` stay no file); a message the rules give back to `edit` as sent is Look's own (Sent.look) and runs lookAt's switch on that target, one nothing takes or a started word declines is Look's own too, whose `.url` arm is now the word's search; the edit port's open of another message runs with look_text, which now means "unplumbed", so the edit port's lookAt never sends again (the recursion trap); the three diff hooks become the default rules of the record's §5.2 (a bare .diff/.patch to `Diff $file`, a commit hash in the editor to `Diff $0`, after the two edit sets), and `Diff` takes a file or a revision, a rule's Diff declining in silence (Pardes.plumb_declined) where it cannot (no hunk, not readable, no .git above): hunks.lookedAt and lookedAtCommit go, their bodies in hunks.word, the `needs` check of the bare form in the word, PaneKind.diff gone; the old one-line `Plumb` word, Core.plumb, look.Port, plumbRuleError, plumbTarget and resolve's rules block go: bare, `Plumb` opens <config>/plumbing as Config opens init (both through builtins.openConfigFile; `include basic` in a new one), an argument is refused in words, Save applies it (host_io.writeFile beside reapplyInitFile, Plumb.saved), and boot reads it (Plumb.boot in applyStartupConfig); a started program now runs detached as Plan 9's plumber's (the coordinator's decision for the user's question 4): Effect.start, every host's host_io.startDetached (double fork, setsid, /dev/null for 0-2, every other fd closed, argv exec'd in wdir with no shell, the child's errno back through a close-on-exec pipe, said as `plumb start: <prog>: <why>`), so exec_dir goes; resolveLookTarget's and Plumb.Send.search's directory walk is one look.Dirs; test: look.zig's Plumb test rewritten onto the rules (a rule's word, an open pane unsent, the hover's resolve, a URL with no web rule searched for) and a hash inside and outside a git work tree; addons.zig's Plumb test onto plumb/rules (a port no kind reads, its kind gone: Look's own); Plumb.zig: the word, the save and boot; replicas.zig gains a URL (speculated whole, confirmed, no rollback) and a hash, each the authority's and a replica's own; every look golden unchanged; the reference quotes src/plumbing whole and says the order, the changelog says so
* | | term: the terminal a module of its own (docs/next-terminal.md, Phase 1): ↵Gabriel Schneider29 hours
| | | | | | | | | | | | src/term/term.zig roots it, importing std, ghostty-vt, wuffs, zstbi and plain, never the core, and gives the core one table, `ops` (plain.term.Ops: about 60 entries, the records they take and give and the opaque handles State, Encoder, Track and Replica, in src/plain/term.zig), its own functions put in it through a cast refused at compile time unless each parameter and result matches the table's but for the handles and every error is one the table names; src/Term.zig, the core's side, takes `ops` from the term module when the build's term_options say the core has one (every core module but core-test's), null otherwise, and Term.State is a handle with the walk's hooks, so a dump keeps a terminal as it did (its Parts by name through walk.save, then ghostty's snapshot) and the digest is the emulator's; echo.zig comes back to the core (src/echo.zig: predicted echo is the replica's presentation, its five reads of the emulator through Term.grid, modes, prompt and Term.echoCell); screen_state's Peer is a plain record both sides name (its noteSent a function of screen_state's), its Encoder, Track and Replica handles made and freed through the table (replica.Screens makes its encoder at the first encode); a prompt's cut is told in columns and measured in its row's text by the core (Term.promptPrefix, File.rawAtDisplay); TerminalImages' decode bound moves from memory.limits to the decoder it bounds; build.zig: core_lean, the core module without the terminal, is core-test's, and wireCore no longer gives any core module ghostty-vt, wuffs or zstbi (the term module has them), so core-test's compile names none of ghostty, wuffs, zstbi, simdutf, highway or -lc++ (from --verbose); term-test runs the module's own tests (the pager's, screen_state's, the luminance table's); the tests of a terminal through a core move as they were to test/terminal.zig, in pane-test, which imports both (`of` reads the emulator behind a handle; the dump round trip frees through State.dumpFree), and tests elsewhere that read the emulator do it through Term.emulatorOf, a test in core-test skipping first; core-test skips a test whose terminal Term.open refuses; Authority.init releases its tape when the core it boots fails (it leaked); tests: core-test (no terminal) 409 of 941, 532 skipped, shell-test (the same tests with the terminal) 984 of 984, pane-test 180 of 181 (1 skipped, as before), term-test 15 of 15, kitty-test 45 of 45, replicas checked/wrong 0, hxdiff 658 cases 0 mismatches, behaviour-test 268 of 272 (the base's four addon ABI tests), lib-test
* | | Term: the draw group as plain data (docs/next-terminal.md, Phase 1): the ↵Gabriel Schneider29 hours
| | | | | | | | | | | | terminal paints its view into a plain cell buffer and the core lays it over the body's rows; Term.paint gives each of its view's rows (Term.PaintedRow: the prompt cut a shell's marks make of it, its kitty placeholders, how many cells it has) and each cell (Term.Painted: its style in the theme's colours, through the filter when the pane has it on, the bytes it spells, its width) for a theme handed in as Term.Ink; src/ansi.zig, new, is the core's half of what was terminal.zig's recolorAnsi, moved: the body walk, the edit copy's anchors (EditAnchors, its rows from Term.editRows) and the grapheme-to-cell alignment, now reading the buffer instead of the emulator's pages, and drawImages' body walk (Term.images takes the rows it maps and appends placements to the frame's list, blanking placeholder cells in its cells, as TerminalImages.draw did through Pardes); the filter stays the terminal's (it wraps ghostty's generate256Color), its record plain (Term.Filter, Term.FilterPalette in src/plain/term.zig, [3]u8 for ghostty's RGB), so a +Pager's spans are drawn through Term.filter and Term.spanColor, and palColor is Ink.palColor; config.tty_filter_min_contrast goes to the filter it bounds; Term.Grid gains the grid's cols; the filter tests reach the plain record's fields through asGhostRgb, asserting what they did; perf --terminal-mib (tail-style line off, ReleaseFast, instructions:u, 3 runs each, ±30k): 8 MiB 4,347.9M -> 3,949.8M (4.51M -> 4.09M a batch), 32 MiB 14,729.1M -> 13,294.4M (3.82M -> 3.45M a batch), the copy costs nothing that shows and the frame got cheaper; core-test 985/985, kitty-test 45/45, pane-test 151/152 (1 skipped), behaviour-test 268/272 (the four addon ABI 3.0 tests the base fails), replicas checked/wrong 0
* | | plain: the records the core and the terminal both name, a leaf module ↵Gabriel Schneider29 hours
|/ / | | | | | | (docs/next-terminal.md, Phase 1, its first step): src/plain/plain.zig takes Color, FontRole, CellStyle, Cell, RectPx, RectCell, Raster and Placement from surface.zig and Key from Event.zig, moved as they are, and imports std alone; surface.zig and Event.zig re-export them under their old names, so no caller changes; src/term/'s files name them through `plain` (pager.zig and TerminalImages.zig no longer reach surface.zig); build.zig's wireCore gives every core module the `plain` import; locations.Row stays (it names look.Spot and walk's digest: not free); core-test 985 of 985, lib-test
* | integration: the terminal behind src/Term.zig, with the diff viewer and the ↵Gabriel Schneider29 hours
|\| | | | | | | | | | | | | | | | | plumber's first phase A merge of term-phase0 and pardes-next. File.zig's recolorSyntax keeps the theme's grounds and names Term.Filter and Term.Span; the changelog keeps both sides' entries, the palette sentence in the place of the entry the terminal work cut down. core-test 985/985 on tui; the diff, pager and tree process cases pass, goldens unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * integration: the diff viewer on general mechanisms, and the plumber's first ↵Gabriel Schneider29 hours
| |\ | | | | | | | | | | | | | | | | | | | | | | | | phase, together A merge of diff-lib and plumber-1; the changelog keeps both sides' entries; core-test 984/984 on tui, the process suite's tree cases pass (fs-help.txt holds both the rows and the plumb lines in its 45). Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | * regexp: a class's range may end at \xff: mvzr counted `c1..c2 + 1` in a u8, ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | which overflowed at 0xff (a panic in a safe build, a loop past its bounds in a fast one), so `[\x80-\xff]` in any search, an address, s or S, a plumbing rule, took the editor down; build.zig's patch of mvzr widens the count to usize, beside its other patches (one occurrence, checked); found writing the plumber's rules, whose classes for UTF-8 names the design record wrote as \x80-\xff; test: a class of a-z and the high bytes finds café, [\xff-\xff] compiles; the changelog says so Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | * plumber: Plan 9's plumber in the core, its language and its files ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | (docs/next-plumber.md, phase 1): src/Plumb.zig owns the rules, kept as their text (Core.plumber, digested and dumped; `include basic`'s, the embedded src/plumbing, until any are written, so a session and a dump from before it start with the defaults) and parsed again for each message, and a matcher over them read from rules.c and match.c: the message's pack and unpack (plumbunpackpartial's whole, short of its data, malformed), packed attributes read and quoted rc's way, rule sets of `object verb arg` lines, variables, include (basic, the configuration directory's, an absolute path, through the taped read site), rc's quoting and `$` expansion at parse and at match, every parse refusal in rules.c's words with its file and line, `$1`-`$9` refused in words (the regular expressions have no capture groups), `matches` over regexp.zig whole (`^(...)$`) or around a click counted in runes with Pike's two patterns, `is`, `set` rewriting for good, `add`, `delete` failing on an attribute not there as match.c's code does, `isfile` and `isdir` finding a name as Look does (past its place, the message's directory, a look's jump list's, Incl's) at the taped resolve sites, once a send; dispose to a port pardes reads (edit: opened as a look opens it, at addr=; web: the host's link opener; a loaded kind by its name), to a rule set's start or client run as exec runs a line (a builtin in place, else a command pane in the message's wdir: Core.exec_dir, exec.runCommand's reuse skipping the sender), or Plan 9's words for what went nowhere; rules print back in the order they were written, a variable where it was set, so a printed text reads back the same; plumb/rules (a write adds rule sets as each is whole, the rest at the close, `>` replaces them, one writer at a time) and plumb/send (a message put together across writes) in the tree, with fs-help's line, the reference's section and tree, and the fstree test's paths; nothing calls the plumber from Look yet; test: Plumb.zig's eleven (every parse error, print and read back, plan9port's basic less its submatch rule sets, its ¡-￿ classes UTF-8's bytes, whole and click matches with horse.gift, quoting, a set's rewrite kept, delete of an absent attribute, dst filtering, isfile and isdir, dispose, a dump keeping the rules), test/behaviour/plumber.zig's two through the tree (Session records the link a host would open); the root's listings in tree.zig's and the process tests gain plumb, and the README folds a blank line to stay 45 lines; the changelog says so Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | hunks: the +Diff's editor side in one place: openDiff, showDiffText and ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | diffSource move from Output.zig, the `Diff` word's body and PaneKind.diff's test from builtins.zig, lookCommit (as lookedAtCommit) and its test from look.zig; builtins.zig's Diff is its one registration (its doc, traits and `run = hunks.word`); the three open hooks a plumber's rules would replace are a call each, look.zig's `hunks.lookedAt` (a bare look at a .diff or .patch) and `hunks.lookedAtCommit` (a commit hash) and ninep/ctl.zig's `hunks.paged` (a +Pager filled with a diff), their conditions inside them; the diff language (diff.zig, syntax.zig's highlightDiff, look's diff-line address) stays where the languages are; code locality's far share 0.575 before and after (codeloc.py --compare); goldens unchanged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | look: one row address, look.rowAddressAt(pane, row, col): the address a ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | row's producer gave it (a query pane's row on its address, Query.rowAddress) else the one the pane's language reads in the line (a diff's: diffClickIn), with where the row's words start and the address's text; the mouse (exec.operandAt), an empty look written back to `event` (events.expandAt) and a whole line written to `look` (look.lineAddress, was diffLineAddress) each ask it once, where the mouse asked Query.rowAddress and diffClick in turn and the other two asked the diff alone; so a query pane's gutter look reaches events and 9P too (the behaviour change, in the changelog); test: a query row's address from an event written back and from its whole line written to look, its code still words; the diff's look tests and goldens unchanged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | rows: a pane's rows from outside, one definition and two sinks: File.setRows ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | is the one writer of a pane's rows (locations.Row, the stored form as it was: digest, dump and blobs unchanged), refusing what its text cannot hold (more rows than lines, an offset or styles past a line's end) and keeping the painting of equal rows; Output.fillRows keeps what is the editor's (the pane, its refill identity, the steps) and hands its rows to it, as the query panes' three writers do; locations.formatRows and parseRows are its text, a line a row, fields a blank apart and the path last (kind m c p with d and u, line col end_line end_col source_column location_end code_start, styles as `-` or `N:start+len=role,...` a role a syntax class and grounds joined by dots); each pane directory over 9P has `rows`, read as that text (+Search's, +Callstack's addresses as data) and written whole lines at a time, at 0 replacing and later following (a line cut by a mount waits for its open's next write; tree.writeLines passes a line on at the offset it was begun at), `>` emptying them; tests: the rows of a +Search, a +Callstack and a +Diff read back from their text equal, byte for byte, and the file read, written whole and across writes, refused and emptied; README, reference and changelog say so Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | output: a results pane's refill identity is its name too, so fillRows loses ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | its diff.commitHash case: fillRows takes the name its producer gives the pane (null: its origin's own, as open names it) and refills only a pane of that name, with that origin and arg, in that directory; openDiff names a commit's +Diff `+Diff-<12 hex>` through it rather than renaming the pane after, so each commit keeps its own +Diff and the same commit refills it, as before (hunks.zig's last test); goldens unchanged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | lib: the diff is a language of pardes-syntax: `diff` (Walk, targetAt), ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | `highlightDiff`, the style byte's `syn_bits` and grounds and colors.Grounds, a theme's colours for them; test/lib colours a C patch through it (each side's code as C, the rows' grounds, Orchard's, and the place a `+` row names) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | hunks: format stacks for a narrow Ctx, not a *Pardes: its two allocators, ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | | | | | | `source(dir, path)` (a file as a look from dir finds it), `declarations(path, bytes)` and the one setting, tslocations; Output.openDiff gives the editor's, its reads the same taped sites as before (locations.sourceText: an open pane's text, else fs.read) and its declarations the locations cache's, so a replica still replays the authority's bytes; displayWidth from File.zig itself; the four format tests read the disk through a Ctx of their own and stop booting a whole Pardes (the look and refill tests still drive the editor); goldens unchanged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | colors: a style byte's four high bits are grounds a theme resolves, not a ↵Gabriel Schneider29 hours
| |/ | | | | | | | | | | | | diff's: syntax.ground_add and ground_del (a row's hue), ground_emph (the stronger ground), ground_line (the faint one), the byte as it was; DiffTints moves from File.zig to colors.zig as Grounds (an add and a del Ground: row, emph, line, ink), the same Oklab mixes and marker contrast; the painter has one rule, a row's first byte says its ground (emph the stronger to the pane's edge, line the faint, neither none, its marker in the hue) and a later byte's emph is its cell's, so it stops asking the pane's colour algorithm (`row_tint = algo == .diff`) and works the grounds out once a frame only for a row that names a hue; highlightDiff marks an added or removed line's first byte emph, the strong row a .diff's rows always had; recolorDiffOutput reads the same Grounds; goldens unchanged (diffview, pagercolor, diffstack), render of the 50k-line file 11,723,421 user instructions a frame before and 11,724,208 after (+0.007%, perf stat over ReleaseFast pardes-perf, 210 frames less 10) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| *-. integration: the drag guides' removal, the build-time highlight filter and ↵Gabriel Schneider29 hours
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the lean-core changes together A merge of drag-guides, syn-buildtime and lean-core; the changelog's three new entries are kept, each whole. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | | * mouse: no drag guides, and columns resize by their grips aloneGabriel Schneider43 hours
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A drag draws no guide lines: the dashes where a pane or column would land, the carried column's rail and the held seam's dashes are gone, with the guide region kind, Surface.overlayDash, the rail's Region.clip and MAX_GUIDES; the gui's floating draw group is the debug box's alone. The line between two columns is no resize handle: Drag.border_v and its corner variant are gone, with clampBorderCol and the unused chromeTarget. A press there is a press in the pane under it (a sweep). A column resizes by its grip, a pane by its grip or, in a window, the rule above it (border_h, unchanged). Tests: the corner and border-drag unit tests and the cornerdrag and cornerdrag-left tty cases are deleted; windowops loses its border drag and tagalign2col widens its column by the grip; colgrip, shrinktag and windowops goldens drop the guides; a unit test pins that a press on the line between columns sweeps and resizes nothing. The cheatsheet, themes, render-pipeline notes and changelog say so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| | * | syntax: the highlight queries are filtered by the build, not in every ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | compile: colorQuery kept each grammar's patterns whose captures pardes colours by scanning the 29 highlights.scm byte by byte at comptime, a quarter of a full recompile of the core (and again in each of the ~15 artifacts that import it); build.zig's treeSitter now runs the same filter once over the query it reads (grammar_manifest.colorQuery, a plain function, with Syn and synFor's capture-to-class table beside it, the one copy both the build and syntax.zig read), so ts_queries' <name>_highlights is the filtered query and Spec.query_src a field read; typst's supplement is the manifest's highlights_extra, appended before the filter as before; <name>_highlights_unfiltered is the whole query, for the test that the filter keeps every colour; a package that depends on pardes gets the same through library's treeSitter, for its own grammar set; proven byte-identical before the comptime path went (29 grammars, 28,398 filtered bytes of 79,678); core-test's forced full recompile 12.7-12.9 s wall / 17.5 s CPU to 9.7-10.1 s / 14.6 s; syntax snapshots unchanged; the changelog says so
* | | | Term: the replica half and the seam's last reaches: screen_state.zig's ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | terminal half is reached through the interface (Term.encode, Term.encodeRows and Term.untrack on the authority, Term.wasRead and Term.clearRead for the rows a step read, Term.apply with the prompt marks riding a delta, Term.applyRows, Term.shown and Term.blank on a replica, Term.Encoder, Track, Peer and Replica its handles), so replica.zig reaches no emulator state; its kind half (a kind's frame as a Shadow, its strips and Blobs, encodeShadow) is the core's and moves, as it is, with its tests, to Kind.zig beside the Slot it shadows; predicted echo is Term.Echo; the draw entries (Term.recolor, Term.images, Term.petscii, Term.togglePetscii, Term.hasImages, Term.Filter, Term.FilterPalette, Term.palColor) are reached through the interface with their signatures as they were, not yet plain data (Term.zig says so); src/Term.zig is the one file outside src/term/ that imports one inside it (fs.zig embeds terminal.zig's text as a served source), panes.terminal, pardes.screen_state and pardes.echo go, the comments that named ghostty for the emulator say the emulator, and the tests that read emulator state read the records but three (Core.zig's palette, pty.zig's output pin and page limit); the changelog says so; nothing else changes
* | | | width: back to libvaxis's gwidth, the user's ruling (keeping a dependency ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | beats reimplementing it in the core): vmkopprq reverted: the core measures a grapheme's cells with vaxis.gwidth.gwidth(.unicode) again (File.graphemeDisplayWidth and its neighbours, surface.zig, draw.zig's test), File.utf8Width and tui.zig's corpus test that held vaxis's width to it go, and build.zig gives libvaxis to the core module again, so vaxis stays a dependency of the core; the widths were the same on every Unicode scalar value (vmkopprq's proof), so every golden and snapshot is unchanged; the changelog's shared entry keeps the palette sentence alone
* | | | pager: one parser, the terminal's: a +Pager's page is read through the ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | interface (Term.page, bytes in, its printed text and SGR spans out, Term.Page and Term.Span plain records), by ghostty-vt's stream as before kqrzvrmm, the handler that keeps the text, the spans and the overstrike moving with it to src/term/pager.zig; pager.zig's own parser (its ECMA-48 states, CSI limits and SGR reading) and src/pager.zig go, so two parsers cannot drift apart, and its tests stay with the page (the colon colours, 8-bit CSI, REP, CHT and CNL test kept, true by construction now); a 32 MiB coloured log pages in 2,074M instructions through the interface against 2,292M with the parser it replaces (ReleaseFast, a bench run once then removed; the same text and spans); Term.zig's tests take term/pager.zig's in; the changelog says the pager's own parser no more; pagercolor and every golden unchanged
* | | | Term: text through the interface, the editing of the copy back to the core: ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | Term.scrollback and Term.scrollbackLen are its whole history as plain text (its body, Save), Term.textRows its rows as text with a prompt's own cells cut off (a plain Term.Rows), Term.viewport the rows its view shows, Term.promptPrefix how many bytes of a row are its prompt and Term.markRead says a step read them; the editing of the copy of a terminal's rows is the core's again, in edit.zig beside the text it edits: shellRows and the rows' cache (edit.RowsCache, edit.drawing), terminalLines (the rows with the copy spliced in), and in edit.zig's own flatSurface, editText, setEditText, pushUndo and undoStep the terminal's arms written out where they were dispatched to terminal.zig; the body's walk over the rows and the copy (BodyWalk) is body_layer.zig's, beside the bodyText it makes; screenTextAlloc, screenTextLen, cursorLines, flatSurface, editText, setEditText, pushUndo, undoStep and bodyText leave terminal.zig; nothing else changes
* | | | Term: prompt and commands through the interface: Term.prompt is the plain ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | record of where the shell is in its command cycle (its phase, commands started, prompts drawn, lines declined, a continuation, the last command to finish and its status, input ready, input empty, the cursor at a prompt), Term.commandOutput what the newest command printed and Term.endOutputHere ends a command's output at the cursor; the pending command queue is the core's (Pane.pending_command, Pane.queuePendingCommand and Pane.releasePendingCommand, released at the shell's start or its prompt where Core.zig hears of them), and so are Pane.greeting, Pane.noteCommand, Kill's "the command pardes typed runs" (builtins.zig) and the newlines that keep a command's output below the edit copy (exec.zig); /pty/status, /pty/run and predicted echo read the record; promptInputReady, promptInputEmpty, commandRunning, armShellSpawn, shellSpawned, deinitPendingCommand and padOutputBelowEdits go; nothing else changes
* | | | Term: input through the interface: Term.key writes a key's bytes as its ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | program's keyboard protocol and modes ask, Term.mouse and Term.wheel a mouse event's and a wheel turn's, Term.paste a paste as xterm makes one, Term.modes is the plain record of the modes the core decides by (mouse, all motion, the wheel, focus, bracketed paste, the alternate screen) and Term.promptMoves how far a click on the prompt line moves the shell's cursor; the mouse's records (MouseMods, MouseButton, MouseAction) are the interface's; keys.forwardKey (the bytes queued, an error reported) and keys.enterTty (raw mode, the cursor handed to the shell) are the core's, in keys.zig, pardes.keys for the tests; bracketedPaste, reportsMouse, reportsFocus, ownsWheel, tracksAllMotion and onAlternateScreen go into the record; the tests that called them follow; nothing else changes
* | | | Term: output and view through the interface: Term.feed takes one read and ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | the rows the core keeps positions on and gives back a Term.Told (where each went, erased or not, cleared, alive, a pin missed), Term.grid is the plain record of the view and the cursor (total, offset, len, the cursor, whether it shows, the view's row or null while it follows), Term.scroll, Term.follow, Term.viewTo, Term.resize (now or for later) and Term.resizeDeferred move it, Term.cellPixels sizes its cells in pixels and Term.replies hands over what it answered its program; the core's half is the core's: Pane.feedOutput and its row tracking (the edit copy's rows, the cursors and selections, their undo and the pointer's rows, gathered as rows and moved as the feed told, ingestWithPositions's core) and Pane.followOutput, Pane.resizeGrid and Pane.panFor in panes.zig with panes.resizeDeferred, the cursor a program shows read from the grid where the body draws it, tape.viewOnly beside tape.authorityOnly; scrollbar, gridOffset, gridCursor, visibleCursor, viewOf, atBottom and their types go; nothing else changes
* | | | Term: the terminal as the core calls it, src/Term.zig, its lifecycle first ↵Gabriel Schneider29 hours
| | | | | | | | | | | | | | | | (docs/next-terminal.md, Phase 0): Term.open makes an emulator and Term.close frees it, Term.due says when its next kitty frame is due, Term.revive resets a restored terminal's modes under its banner, Term.start and Term.stop run the PNG resize workers; the pane half of each is the core's: panes.createDoc and panes.createTerminal make the pane (the speculation guard there), emulatorGpa and emulator_gpa are the core's choice of allocator, teardownPane closes the emulator, dump.zig's revivePane resets what the old shell was and ensureKind opens an emulator straight into the pane; tape.authorityOnly is the one guard Kind.zig and the terminal both had a copy of; nothing else changes
* | | | term: the terminal's own files move into src/term/ (terminal.zig, ↵Gabriel Schneider29 hours
|/ / / | | | | | | | | | screen_state.zig, echo.zig, TerminalImages.zig), as they are: names and signatures kept, only the import paths change (theirs to ../, pardes.zig's, panes.zig's, tape.zig's, replica.zig's and Kind.zig's to term/), the comments that name them by path follow, and the embedded sources serve terminal.zig at src/term/terminal.zig; the first step of docs/next-terminal.md's Phase 0, a move, nothing else
* | | text: a terminal's edit overlay and its undo are the Text's: EditBuffer, ↵Gabriel Schneider29 hours
| | | | | | | | | | | | Snapshot and history_max move from terminal.zig into Text.zig, as they are, so Text names no terminal type (terminal.zig and panes.zig's ovl name them there, as test/panes.zig does); a move, nothing else