Documentation
¶
Overview ¶
Package diff builds whole-file line models for changed files: every line of the new file with deletions interleaved, ready to render with changed lines highlighted in full context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileDiff ¶
type FileDiff struct {
File git.ChangedFile
Stat git.FileStat
Lines []Line
OldTotal int
NewTotal int
Changes []int // indices where add/del runs begin, for jump keys
Binary bool
Truncated bool
Err error
// contains filtered or unexported fields
}
func BuildFile ¶
BuildFile diffs two file versions into the whole-file line model: every new-file line in order, with deleted old lines interleaved ahead of the lines that replaced them.
func (*FileDiff) SideBySideRows ¶
type Row ¶
type Row struct {
Left, Right int
}
Row addresses one side-by-side display row; -1 means a blank cell.
Click to show internal directories.
Click to hide internal directories.