Skip to main content

Module diff

Module diff 

Source

Structs§

DiffLine
A diff line rendered but not yet fitted to the viewport: callers wrap it or truncate it, using fill for the padding and ellipsis they add.
DiffRow
One canonical rendered diff row: the styled line plus the patch position it was laid out from, so the full-screen review can anchor comments to it and the inline preview can select its content subset.

Enums§

DiffRowKind
DiffTone
How a diff row is tinted. Both the inline previews in the transcript and the full git-diff screen render through this, so a line looks the same wherever it is shown.

Functions§

diff_line
Renders gutter (line numbers and any change marker) followed by the syntax-highlighted source, tinted for tone.
diff_rows
Lays out file for width columns: a split view when the width allows it and the diff has removals to put on the left, unified otherwise. Every diff rendering in the application draws these rows or a subset of them.
render_diff
The bounded inline preview: the first MAX_PREVIEW_ROWS content rows of the canonical layout, with the hidden remainder collapsed into a count.