diff options
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; |
