# Changelog ## Unreleased - The terminal is a module of its own (`src/term/`: the emulator, its screen state for replicas, kitty images, the pager's parse), which never imports the core and is reached through one table of plain-data entries, `src/Term.zig` the core's side (docs/next-terminal.md). Editing a terminal's text is the core's, on a copy of its rows, as before, and predicted echo stays the core's; nothing a session does changes, and a session dumped before loads after. `zig build core-test` builds the core without the terminal (no ghostty, no C++): a shell boot is a scratch pane there and a test that needs a terminal skips; `zig build shell-test` runs the same tests with it. - A diff paged (`git show | pardes -`) is a plumbing message, as acme's `plumb -i` sends what it shows: `type text/x-diff` to `edit`, which a default rule makes `showdiff`, its +Pager stacked in a +Diff as before. Take the rule out and the +Pager stays as text; a program reading `plumb/edit` sees the diff. The `edit` port shows any message's data with `action=showdata` (stacked with `showdiff`). - A port the plumbing rules name is a file a program reads, `plumb/`, as Plan 9's plumber serves one: every open reads its own copy of what is sent there from then on (`cat plumb/edit` sees each file a look opens), a read held until a message comes. A message to a port no one reads runs its rule set's `start`, or with `plumb client` waits for the port's first reader. - A look asks the plumber first, as acme's does: once the pane's own readings are done and a name already open in a pane is focused, what is looked at is sent (`type text`, `src pardes`, `wdir` the pane's directory), and only what no rule set takes is Look's own. The default rules keep every look as it was: the browser for a URL, a bare `.diff` or `.patch` stacked in a +Diff, `git show` of a commit hash in a git work tree are now rules of `src/plumbing`, no longer written into Look. `Diff` takes a file or a revision (`Diff fix.patch`, `Diff 3f2a9c1`), and a rule's Diff that cannot declines, so the look goes on. `Plumb` opens your plumbing file (`/plumbing`, `include basic` until you save one), read at start and applied when saved; the one-line `Plumb suffix .svg to image` rules are gone, refused in words (write a rule set: `data matches '.*\.svg'`, `arg isfile $data`, `plumb to image`). A program a rule starts runs detached, as Plan 9's plumber starts one, with no pane; a failure to start it is said. - A search with a class whose range ends at `\xff` (`[\x80-\xff]`, in an address, `s`, a plumbing rule) no longer takes the editor down: mvzr counted the range past a byte's end. - The plumber, Plan 9's, is in the session: `plumb/rules` holds its rules in plumb(6)'s language (rule sets of `object verb arg` lines, variables, `include`, `matches` over the whole text or around a click, `isfile` and `isdir` finding a name as a look does), and `plumb/send` takes a message and sends it where they say, to a port pardes reads (`edit`, `web`, a loaded kind) or to a word or command started, with Plan 9's words when it cannot. A session starts with `include basic`, pardes's rules (`src/plumbing`). Kept in a dump. `$1`-`$9` are refused, the regular expressions having no submatches. - A query pane's row looked at on its address (its gutter) opens the row's place however the look arrives, as a click there always did: an empty look written back to the pane's `event` file, and the whole row written to its `look` file, now take the address the row holds, not a word of its text. A diff's lines answer all three ways through the same one function (`look.rowAddressAt`). - Each pane's directory over 9P has a `rows` file: a line a body row of a results pane (+Search, +Callstack, +Diff, a language server's list), where it points (`path`, line, column, the address's end, where its code starts) and how it is coloured (runs of `keyword`, `string`, ... and the grounds `add`, `del`, `emph`, `line`), so a 9P client reads their addresses as data, not by parsing the text. A write at offset 0 replaces a pane's rows, a later one adds to them; rows its text cannot hold are refused. An edit drops them, as before. The editor's own producers set rows the same one way. - A drag draws no guide lines: no dashes where a pane or column would land, no rail for a carried column, no dashed seam under a pane rule held. The line between two columns no longer resizes them (nor, at a pane's corner, the panes too): a press there is a press in the pane. A column resizes by its box, left of its tag; a pane by its own box, or in a window by the rule above it. - An edit to the core recompiles it about 2 s sooner again (`core-test`, 16 % fewer of the compiler's instructions, 4.4 MB less code in a Debug test): a load's note on a field (another build's dump) is written from the type's and the field's names at run time, where every type and field had its own copy of the code that writes one; one byte dump's reader serves a session, a pane and the rest, where each had its own; and what tells a replica's build from another's (`wire.semantics`) joins its two long parts on, and the tape's shape writes its numbers itself and copies each line it builds once, where it formatted them and copied the line again for each piece, at every compile. - An edit to the core recompiles it about 3 s sooner (`core-test`, 13 s to 10 s): the build keeps each grammar's highlight patterns that pardes colours once, where every compile of every program that takes the core did it again, a quarter of its time. A package that depends on pardes is given the same filtered queries. - The 256-colour palette Petscii art and the window draw a palette colour with is pardes's own (`colors.xterm`), ghostty-vt's default to the entry. - Commit patches open as `+Diff-` and reuse only their own commit's pane, so another paged patch no longer replaces one already open. - zstbi is upstream's again (zig-gamedev/zstbi, its main): the fork pinned for Zig 0.17 was deleted, and a fresh checkout could not fetch it. - pardes's syntax is a library: a Zig package that depends on pardes is given the `pardes-syntax` module (`src/lib_syntax.zig`), with the grammars, highlighting, declarations, syntax tree and themes as the editor has them, for a program that draws source text itself. Every dependency but tree-sitter's runtime is lazy in the manifest, so such a package fetches the runtime and the grammars of its `tree-sitter` set and nothing else; `zig build lib-test`, which `unit-test` runs, builds one (`test/lib`). The markdown grammar is pinned by its commit: its branch has moved, and a fresh checkout could not fetch it. - Enter, `o` and `O` give the new line helix's indent where the file's grammar has an indent query (bash, C, C#, C++, Clojure, CSS, Elixir, Fortran, Go, HTML, Java, JavaScript, JSON, Kotlin, OCaml, PHP, Python, Ruby, Rust, Scala, Zig), from the file's syntax tree; elsewhere the line's indent as before. Enter between a pair (`()`, `[]`, `{}`, quotes) puts the closer on a line of its own and the cursor on one a level in. A closer typed on its own line stays where it is typed, as in helix. - A session's end (`Exit`, the last pane's `Del`, its terminal or window gone) leaves a slim dump in the state file: its panes with their files, directories and places, not a clean file's text, an undo history or a terminal's screen. `History` (`SPC f h`) lists the state file's dumps in a `+History` pane, each as the command that brings it back, `Restore