previous_annotation

Function previous_annotation 

Source
pub fn previous_annotation(
    document: &Document,
    position: Position,
) -> Option<AnnotationNavigationResult>
Expand description

Finds the previous annotation before the current position, wrapping to the last if needed.

Navigation wraps circularly: if the cursor is at or before the first annotation, returns the last annotation in the document. Returns None only if the document has no annotations.