diff options
Diffstat (limited to 'docs/tags.md')
| -rw-r--r-- | docs/tags.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/tags.md b/docs/tags.md index 93c8a6fa..4d4e9178 100644 --- a/docs/tags.md +++ b/docs/tags.md @@ -64,6 +64,20 @@ Unsaved text shows on the pane's grip, as acme's modbutton, not in the tag. In a terminal the grip is two cells: the pane's mode (blank normal, `^` insert, `$` tty mode), then `*` while unsaved. +## Reviewing diffs + +Open a `.diff` or `.patch` file, or run `git diff` (or `git show`, `diff -u +old new`) as a command from any tag: once the command has finished, output +that starts as a diff does (a `diff --git` line, or a `--- ` line with `+++ +` and `@@` under it) is shown as one. Each hunk's code is coloured in the language of the file its +section names (`+++ b/<path>`, or `--- a/<path>` for a deleted file), its +old side (context and removed lines) and new side (context and added lines) +each parsed as one text, so a string or comment across lines colours as it +does in the file. Added and removed rows are tinted to the pane's edge, +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. + ## Editing tags A tag is text like a body, with the body's normal and insert modes and undo. |
