Skip to main content

diff_marks

Function diff_marks 

Source
pub fn diff_marks(head: &str, current: &str) -> Vec<(usize, LineMark)>
Expand description

Compute per-line gutter marks between the committed text (head) and the current buffer (current), keyed by current line index (0-based).

Uses a line diff: inserted runs are LineMark::Added, replaced runs are LineMark::Modified, and a deletion records a LineMark::Deleted at the current line where the removed text used to be.