Expand description
What a diff view needs from a Diff, independent of how it draws: the
ranges to mark, the filler blocks that keep two panes aligned, stepping between changes,
the edit that reverts a change, and the unchanged stretches worth collapsing. Offsets are
chars, lines are 0-based.
Structs§
- Filler
- A block of empty lines in one pane, so the panes stay aligned.
Enums§
- Diff
Mark - What a marked range is.
Functions§
- fillers
- Side by side, the shorter side of each change gets the missing lines.
- marks
- The ranges to mark: the original’s in
old, the modified text’s innew. Withinlinethe original is not shown, so it gets no marks. - next_
change - The first line of the next change after
linein the modified text (or the previous one before it), wrapping around; None without changes. - revert_
edit - The edit to the modified text that puts change
c’s original lines back. - unchanged_
regions - Unchanged stretches longer than
2 * contextlines on one side (in_modifiedpicks it), as (first, last) lines to fold, keepingcontextlines around each change.