Skip to main content

annotate_word_level_diffs

Function annotate_word_level_diffs 

Source
pub fn annotate_word_level_diffs(lines: &mut [DiffDisplayLine])
Expand description

Annotate word-level (intra-line) changed ranges on consecutive -/+ pairs.

Groups consecutive Deletion lines followed by consecutive Addition lines, pairs them index-wise, and stores byte ranges of tokens that differ. This powers the two-level background: full-width line tint + stronger word chips.