Skip to main content

is_downshift_worthwhile

Function is_downshift_worthwhile 

Source
pub fn is_downshift_worthwhile(parent: &Fragment, excerpt: &Fragment) -> bool
Expand description

Whether a core should be rendered as its excerpt rather than in full.

True when the hunk window covers only a small share of the parent, which is exactly the over-dump shape: the parent’s remaining lines are unchanged context that the reader did not ask for. A change spread across most of the fragment keeps the fragment.