summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 15:39:27 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commita898c0cce8377150417e7d8dda8f952ffdf241ab (patch)
tree2197f55f9c58c80c5608b84f5510141ba6771cba /docs
parentc04df904f2fa686cbe5ce0c078a96260af7b08bd (diff)
downloadpardes-a898c0cce8377150417e7d8dda8f952ffdf241ab.tar.gz
pardes-a898c0cce8377150417e7d8dda8f952ffdf241ab.zip
A right click on a diff line opens the place it names: its file, the hunk's new line, the line itself
In a diff pane (a .diff/.patch file, or a command pane's diff output), the look's own expansion, which its hover shows, takes a whole line for a `diff --git`, `---`, `+++` or `@@` line wherever the pointer is on it, markers included, and for a hunk line when the pointer is on its `+`, `-` or space. Then the look opens the file (a/ b/ dropped, timestamps cut) at the line from the hunk header and the lines above it: `@@` the hunk's first new line, context and added lines their own, a removed line the new line now where it was. `diff --git` and `+++` open the new file; `---` the old one, unless the `+++` under it names another. On a hunk line's code the expansion is its words, the prefix never one of them, and looks as ever. Other panes are untouched. Paths resolve in the repository (walking up to `.git` or `.jj` from the diff's directory, or a command pane's), then that directory. A file not here opens nothing and says `Look: b/x: no such file here`, or `deleted by this diff`. A 9P look writing a whole line of the diff does the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/fs.md2
-rw-r--r--docs/tags.md18
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 146ff17b..864bfd12 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -208,6 +208,8 @@ A line written to `look` is a right click on it:
too.
- a directory types `ls` into a terminal idle there, else opens one there.
- a URL opens in the browser.
+- in a diff pane, a whole line of the diff opens the place it names, as a
+ right click on its first column does ([tags.md](tags.md#reviewing-diffs)).
- a plain word selects its next place after dot, wrapping (`LookWord list`
on the root ctl lists every place in a `+Search` pane instead). In a
terminal a word is always listed, rows spelled `@p3:12:5-9`.
diff --git a/docs/tags.md b/docs/tags.md
index 4d4e9178..993e8c0d 100644
--- a/docs/tags.md
+++ b/docs/tags.md
@@ -78,6 +78,24 @@ their `+`/`-` in the tint's hue (the theme's ANSI green and red where it
has them); a file in no language pardes knows keeps the plain line colours.
Only the hunks in view are parsed, a few dozen lines at a time, each once.
+Then right-click to jump; the look's hover shows what the click takes. On
+a `diff --git`, `---` or `+++` line, anywhere on it, markers included, that
+is the whole line, and it opens its file: `diff --git a/x b/y` and `+++`
+the new one, `---` the old one unless the `+++` under it names another (a
+rename, a new file, `diff -u old/x new/x`), since the old name is the one
+likely gone. On a `@@ -a,b +c,d @@` line it is the whole line again, and
+opens the new file at line c. On a hunk line, the `+`, `-` or space in its
+first column takes the whole line and opens the new file at that line; for
+a removed line, at the new line now standing where it was (the one after
+it, or the hunk's last when it went from the end of the file). The code
+after it is words, looked at as ever. Paths are the repository's: pardes
+walks up from the diff's directory (a command pane's own) to a `.git` or
+`.jj` and drops git's `a/`/`b/`, else takes them from that directory as
+written; `diff -u`'s timestamps are cut. A file that is not here (a branch
+not checked out) opens nothing and says so: `Look: b/x.zig: no such file
+here`, or `deleted by this diff` for a deleted one. A 9P `look` of a whole
+line of the diff does the same.
+
## Editing tags
A tag is text like a body, with the body's normal and insert modes and undo.