You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7974a70
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: mods/diff/README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,9 @@ opens nothing, and where the surface does not say, nothing opens by
23
23
itself. A docked pane fetches before it opens, as the built-in panel
24
24
primes its data, so it never lands on `Loading diff…`; an open the engine
25
25
leaves waiting undrawn is withdrawn, so no later resize seats it, and the
26
-
next edit asks again.
26
+
next edit asks again. A session resumed or continued whose transcript
27
+
already holds such an edit opens the pane on the same terms as soon as the
28
+
width is known, as the built-in opens on the history it restores.
27
29
28
30
Under the fullscreen layout a terminal under 110 columns gets the
29
31
built-in's line asking for a wider one and nothing opens. Without that
@@ -39,7 +41,9 @@ dismissed`; toasts are held while it is up. A file's ask button arms that
39
41
file: its hunks ride the next prompt as context, once.
40
42
41
43
The pane compares the working tree against HEAD, split at the session's
42
-
start (the default), against HEAD plainly, or against the merge-base with
44
+
start (the default; the start the engine gives in `$.session.usage()`, so a
45
+
resumed session keeps its first and `/clear` begins anew), against HEAD
46
+
plainly, or against the merge-base with
43
47
the default branch; the base line under the header names a base other than
44
48
the session's, and the choice is kept per repository in the plugin's store.
45
49
A picker shows one earlier turn's edits instead of the working tree, read
@@ -65,7 +69,7 @@ moved file by.
65
69
66
70
| event | what the hook does |
67
71
| --- | --- |
68
-
|`session.start`| Binds the engine once and registers `/diff` (a session where another `/diff` is listed leaves the plugin idle); asks nothing of the repository, which `/diff` or the first edit pins when it comes. |
72
+
|`session.start`| Binds the engine once and registers `/diff` (a session where another `/diff` is listed leaves the plugin idle); asks nothing of the repository, which `/diff` or the first edit pins when it comes; off its dispatch, reads the transcript, and for a resumed session whose turns edited opens the pane as the first edit would. |
69
73
|`ui.render` of `PromptHint`| Reads the terminal's width and whether its layout docks a pane, which decide whether the first edit opens the pane. |
70
74
|`ui.render` of `Pane`| Draws the pane: docked, the header, base line, source picker, file list and toggles over the window of hunks; inline, the dialog. |
71
75
|`command.run` of `diff`| Pins the repository when none is, opens or closes the pane (focused and closing on Escape without the fullscreen layout), says which, and remembers the choice. |
0 commit comments