Skip to main content

Module pairing

Module pairing 

Source
Expand description

Pair deleted/added line runs inside a hunk and attach intra-line emphasis. Within a run, lines pair by best total similarity (delta’s homologous-line model): an unbalanced run pairs each line with its true counterpart, and lines with no counterpart stay unpaired and render plain: emphasis only ever contrasts a line against its homolog.

Functions§

enrich_file
Attach intra-line emphasis to one file’s hunks. Pairing is a render-time concern (only the TUI reads .emphasis), so callers enrich the file they are about to display rather than enriching whole models up front.