Skip to main content

one_sided

Function one_sided 

Source
pub fn one_sided(region: &Region, other: &OtherSide) -> bool
Expand description

True when no leaf under region, itself included, is paired with the other side.

Newness is the leaves’ answer. A fold covers its body alone — the header line that opens it belongs to the leaf before it — so the leaves inside a body fold are the body, and a body grown in place, whose lines still align, is a rewrite rather than a removal. A fold state, on the other hand, says only whether the matcher paired the two nodes, and a file diffed by line pairs no folds at all while its lines still align. So a fold is new, or deleted, exactly when nothing inside it lines up with the other side.