Expand description
Calculating which modified lines should be displayed together.
Structsยง
- Hunk ๐A hunk represents a series of modified lines that are displayed together.
Constantsยง
- MAX_
DISTANCE ๐The maximum number of lines that may occur between changed lines in a hunk.
Functionsยง
- either_
side_ ๐equal - enforce_
increasing ๐Given a slice of line pairs that are ordered as far as possible, but may refer to earlier lines, return line pairs that are monotonically increasing. If an earlier line occurs after a later line, replace that line with None. - extract_
lines ๐ - fill_
between ๐ - find_
novel_ ๐lines - lines_
are_ ๐close - lines_
to_ ๐hunks Split lines into hunks. - Given a set of matched lines between the LHS and RHS, return the start and end indexes in
matched_linesthat should be displayed forhunk. - matched_
novel_ ๐lines - matched_
pos_ ๐to_ hunks - merge_
adjacent ๐If any hunks are sufficiently close that they have overlapping lines, merge them. - next_
opposite ๐ - Given a sequence of novel
MatchedPosvalues in a section between two unchangedMatchedPosvalues, return them in an order suited for displaying. - Return a vec of novel
MatchedPosvalues in an order suited for displaying.