Skip to main content

refresh_references_view

Function refresh_references_view 

Source
pub fn refresh_references_view(
    activator: &mut dyn ModeActivator,
    view: BufferId,
    locations: &[Location],
) -> Option<usize>
Expand description

LR.3 (2026-08-11): rebuild an existing references view from a fresh result set, in place.

In place is the point: create_references_view mints a new BufferId every call, so a refresh that re-opened would strand the view the user pressed gr in and add a second *references* beside it — the mistake *problems* refresh had to avoid too.

Returns the new site count, or None when the view is unknown or the fresh results yield nothing to show — in which case the view is left exactly as it was. A refresh must never blank the buffer the user is reading.