Expand description
MG.5: magit-diff major mode.
Fold audit fix: this used to be a full stub — on_activate
registered only a close handler and the buffer opened empty; s/
u were declared in the keymap with no handler of their own, so
pressing them silently hijacked whatever magit-status handler
happened to be registered (operating on magit-status’s captured
buffer state, not this buffer’s cursor). The design’s full
side-by-side DiffSession + hunk-level staging (reusing D.4’s
pane-group machinery) remains a larger follow-up; this is a
real, scoped middle ground: git diff HEAD content (staged +
unstaged changes combined, matching the module’s original
“against HEAD” framing) with its own file-level s/u/x
handlers, scoped to this buffer’s own state.
d on a file in magit-status’s Staged/Unstaged sections
(action:magit-diff-file in actions.rs) opens one of these
buffers scoped to BOTH a file and a baseline
(*magit:diff:staged:<path>* / *magit:diff:unstaged:<path>*),
instead of the status buffer’s own inline = toggle — large
diffs get a real scrollable buffer instead of ballooning the
status buffer’s line count (and re-triggering its splice-based
inline-highlight bookkeeping) for a file the user just wants to
read in full.
Structs§
- Diff
State - Magit
Diff Mode - View
Args Requests - MG.43h: arguments a dispatch row collected for a view it is about to open.
Type Aliases§
- Diff
States Handle - MG.13: service alias for this mode’s per-buffer state
(
feedback_servicesregistry_arc_typeid). - View
Args Requests Handle