diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-23 15:10:44 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-23 15:38:37 -0300 |
| commit | 3e60c54651f10fe9233a40bc1f1fdaed141d2116 (patch) | |
| tree | d6023a7f7e1bc02319e7f9bf75b76e4eed90517d /core/hunks.zig | |
| parent | 0e2012de121a9735d3c2ab7871a04d144636b849 (diff) | |
| parent | f34d3a74cc4a6b735c98ce98cef0df42bd065e67 (diff) | |
| download | pardes-3e60c54651f10fe9233a40bc1f1fdaed141d2116.tar.gz pardes-3e60c54651f10fe9233a40bc1f1fdaed141d2116.zip | |
merge: the Changes layer as the pane's read-only text (pardes-m64-base: round 8's two changes on pardes-merge63c) and Compare (pardes-merge64: `ntlsszul`, `qkksrtsn`), resolved by function: `pinWord` (Compare's road for both words) keeps round 8's `setLanes` (the layer the pane's: shown or hidden in every view of it), `pinAnswer` parses the file's text (`File.fileText`) and names its kind's word in every notice, `describe` gives a pair its row whole (no author; `fitted` gone with round 8's cut) and returns where an author would start, `isPair` kept beside it, `lookGhost` reads a description line as round 8 does (a buffer line, `readOnlyRow`) and opens a pair's patch by its row's first word (`from..to`), hunks.zig `word` tries a pair then a change (`diffChange(.., false)`) and keeps round 8's revset word at no such file, its doc saying both; round 8's rule made Compare's (the coordinator's 15:10: "a pair is ahead when its FROM point's text is the shown one"): `pairRuns` finds where the revision shown stands among the points (an empty `jj diff --from POINT --to REV`: the last point first, the one diff already run; then from the first), marks every pair from there on `a` (pinned, ahead) or `d`, and adds the step from the last point to the revision shown only when no point's text is the shown one; `pairOwners` skips a step ahead (it wrote none of the shown lines); the test marked ROUND 8 ("Compare in a revision's pane at its middle point ...") now wants the second pair ahead (`d();` the text's, going; `d2();` and `e();` read-only lines after it; its row after them) and passes; the first Compare test's `]g` wants each run's first line, a layer's line among them (rows 2 and 6, where ghost rows were no lines: 2 and 3); the guide's *Points.* paragraph says a middle point's pairs as built, the cheatsheet's and the guide's table rows both sides', `pinWord`'s and Compare's docs (builtins.zig, both JSON lists) "in every view of it"; core-test filtered on jj (Debug tui): 54/54 with the next changes' tests left out
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/hunks.zig')
| -rw-r--r-- | core/hunks.zig | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/hunks.zig b/core/hunks.zig index db2401f6..8f56f8f1 100644 --- a/core/hunks.zig +++ b/core/hunks.zig @@ -703,9 +703,11 @@ fn trimmedWidth(ctx: *const Ctx, section: []const u8) usize { /// a digit among them), `git show` of it, paged into a +Pager that stacks /// its hunks (ctl.fillPager), run in the pane's git work tree; with a jj /// change (`Diff wrnnmymq [path[:line]]`: jj.diffChange), its patch, header -/// and all, the cursor at that place in it; with any other word that names +/// and all, the cursor at that place in it; with two points joined by `..` +/// (`Diff ozlwptts..pyquzokk [path[:line]]`: jj.diffPair), the difference +/// between them, the changes between on top; with any other word that names /// no file, in a jj repository, the revision jj takes it for (`Diff @-`, a -/// bookmark), the same. A plumbing +/// bookmark), its patch as a change's. A plumbing /// rule's Diff that cannot (no hunk, no work tree) declines, saying /// nothing (Pardes.plumb_declined), and the look looks itself. pub fn word(c: pardes.builtins.Ctx) void { @@ -735,7 +737,9 @@ pub fn word(c: pardes.builtins.Ctx) void { if (p.panes[dst]) |cp| cp.command_pages = true; return; } - // A jj change (its letters k to z), with a place in its patch to stand at. + // A jj change (its letters k to z), with a place in its patch to stand at; + // two points joined by `..`, a `Compare`'s pair. + if (@import("jj.zig").diffPair(p, c.id, arg)) return; if (@import("jj.zig").diffChange(p, c.id, arg, false)) return; if (@import("jj.zig").isChangeId(arg[0 .. std.mem.indexOfAny(u8, arg, " \t") orelse arg.len])) return declined(p, c.id, "Diff: no such change"); var buf: [4096]u8 = undefined; |
