diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 15:13:18 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 19:20:33 -0300 |
| commit | e9a641ee2c743fec2fe2505d2e11c96fa36767b8 (patch) | |
| tree | 0475bbf328bf21e41b573c0cd95684d8a7336741 /core/Query.zig | |
| parent | 4887578ce82518c84ef76f7ee03748911f4f9933 (diff) | |
| download | pardes-e9a641ee2c743fec2fe2505d2e11c96fa36767b8.tar.gz pardes-e9a641ee2c743fec2fe2505d2e11c96fa36767b8.zip | |
core, docs: the docking vocabulary, the family the rename of attached_to to docked_to left (P37): layout.attachFrom -> layout.dockFrom (its five callers: Query.zig x2, Store.zig, its tests), testAttachment -> testDocking, Query.zig's local attached -> docked, the section "Attached panes" -> "Docked panes" (and the three comments that name it), and "attached", "attachment(s)", "unattached", "Attach new pane", "detaches it" where a pane is docked to a pane -> "docked", "docked pane(s)", "undocked", "Dock new pane", "undocks it", through core/layout.zig (two test names with it), core/Handover.zig, core/Store.zig, core/Query.zig, comments in core/panes.zig (4) and core/builtins.zig (2), docs/next-drag.md, docs/search-proto-converge.md and docs/next-daemon.md (1); every attach of a client to a session stays, as do the search prototype's name "attached" and its setting SearchPlace attached|column (docs/search-proto-converge.md:18, :134: names of the past) and the changelog's past entries; no behaviour changes; gate on the stack through this change and the docking vocabulary (load 4-32): tui core-test 871/1028 (157 skipped), shell-test 1070/1073, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, consumer-test passes, addon-test 5/5, process-test 0 of 144 (tty boot: msg failed once at load 32 and passed alone), replicas --clients 5 and --bytes --clients 5: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak; the semantics word a73794ff9e03f814 as on merge40; daemon.py --far, --games, --window-clients pass, plain fails 2 of 4 at "client C agrees with a shell's output" (a timeout), as merge40's build does 3 of 6; the macOS library (x86_64-linux, aarch64-macos, the ABI guard 2/2) and the FreeBSD cross-build build; frames 77/77, gui unit-test 1666/1670 (the perf check's BaselineHarnessMismatch), perfab corpus2x +0.054% (noise 0.054%), the 121 per-operation counts within 0.1% against tree2 (key-down on medium 10,039,720 and render on medium 11,454,636, merge40's gate 10,039,703 and 11,454,619)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Query.zig')
| -rw-r--r-- | core/Query.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/Query.zig b/core/Query.zig index ebb44155..95322cc1 100644 --- a/core/Query.zig +++ b/core/Query.zig @@ -1,5 +1,5 @@ -//! The query pane: the one pane search is. A +Search attached under the -//! pane that asked (its owner, layout.zig "Attached panes"), born at a +//! The query pane: the one pane search is. A +Search docked under the +//! pane that asked (its owner, layout.zig "Docked panes"), born at a //! fixed height, whose body's line 1 is the query, editable text, and //! whose rows below are made live from a source, read-only while live. //! Line 1's first word names the source: `/pat` the owner's text (smart- @@ -18,7 +18,7 @@ //! text: B3 on one looks, B2 on line 1 runs it again. Wherever a row points into //! an open pane's text, that pane's places (Places.zig) show the set: //! tints, rail ticks, the current one selected. A row pointing at a file -//! no pane shows is shown in the +Preview attached under this pane; Enter +//! no pane shows is shown in the +Preview docked under this pane; Enter //! promotes the preview to the file's pane where it stands. //! //! Nothing moves while you type: the pane never closes, resizes or @@ -319,7 +319,7 @@ fn create(p: *Pardes, owner_id: usize, line: []const u8, source: Source) ?usize preview_rows = spare -| want; } } - if (!layout.attachFrom(p, owner_id, free, want, owner_id)) { + if (!layout.dockFrom(p, owner_id, free, want, owner_id)) { // An owner too short to give a query pane its rows: placed as any // new pane is, the one place a search moves another pane. layout.placeNew(p, owner_id, owner_id, free, .doc); @@ -1635,7 +1635,7 @@ fn makePreview(p: *Pardes, qid: usize, rows: u16, giver: usize) ?usize { return null; }; layout.compute(p); - if (!layout.attachFrom(p, qid, free, rows, giver)) { + if (!layout.dockFrom(p, qid, free, rows, giver)) { p.removePane(free, qid) catch |err| p.reportError(.at(qid), "query", err); return null; } @@ -1723,7 +1723,7 @@ fn displayPreview(p: *Pardes, qid: usize, path: []const u8, at: look.Spot) void /// The +Preview becomes the file's pane where it stands: same slot, same /// serial, same rect, its scroll and selection as the preview left them. /// It is a file pane from here: an empty undo history, the Recent entry, -/// the watch, a file's tag; and a pane of its own, no longer attached (it +/// the watch, a file's tag; and a pane of its own, no longer docked (it /// stays when its query pane goes). fn promote(p: *Pardes, qid: usize, id: usize) void { const pane = p.panes[id] orelse return; @@ -1902,10 +1902,10 @@ pub fn cancel(p: *Pardes, id: usize) void { if (owner_id) |oid| p.view().active = oid; return; } - // Attached, its rows go back to its owner; else to its own column's. - const attached = layout.ownerOf(p, id) != null; + // Docked, its rows go back to its owner; else to its own column's. + const docked = layout.ownerOf(p, id) != null; if (owner_id) |oid| { - p.removePane(id, if (attached) oid else null) catch |err| p.reportError(.at(id), "query", err); + p.removePane(id, if (docked) oid else null) catch |err| p.reportError(.at(id), "query", err); p.view().active = oid; if (layout.findPane(p, oid)) |at| p.setActiveColumn(at.col); } else p.removePane(id, null) catch |err| p.reportError(.at(id), "query", err); |
