Skip to main content

nth_visible_line_backward

Function nth_visible_line_backward 

Source
pub fn nth_visible_line_backward(
    fold_idx: &FoldIndex,
    start_line: u32,
    offset: u32,
) -> u32
Expand description

Walk backward from start_line and return the line at offset visible rows above it. Walking backward hops over closed fold bodies to their visible heads, then continues from the preceding line. Returns 0 when the walk hits BOF before consuming offset rows.