Skip to main content

Module diff_render

Module diff_render 

Source
Expand description

Diff-line renderers shared by the status screen’s inline diffs and the diff view (syntax = fg, diff kind = bg, emphasis = stronger bg).

Structs§

LineFlags
PairSelection

Enums§

Mark
What colours a byte range of a line’s text beyond its syntax.

Functions§

diff_line_height
file_gutter_width
fold_row
hunk_gutter_width
The floor of 4 keeps neighbouring hunks from disagreeing on width.
hunk_header
line_syntax
render_diff_line
render_hunk_lines
Index 0 of the result is the @@ header, the rest map 1:1 to hunk.lines; selected indexes the result.
render_split_pair
split_pair_height
Must agree with render_split_pair’s wrapping.
syntax_row
number counts from 1.

Type Aliases§

SideSyntax
Per-file syntax for both diff sides, (old, new), each indexed by line number.
SplitCell
One side of a side-by-side row, None for a column with no counterpart.