Skip to main content

resolve_pane_render_mode

Function resolve_pane_render_mode 

Source
pub fn resolve_pane_render_mode<L: ProviderLookup>(
    editor: &Editor,
    buffer_id: BufferId,
    lookup: &L,
) -> Option<ModeId>
Expand description

Resolve the ModeId whose pane-render provider should drive the pane displaying buffer_id. Walks active minors in reverse activation order (most-recently activated wins — same priority the option resolver uses) before falling back to the major. Returns None when no active mode has a provider registered, in which case the renderer uses its default document path.

The probe is &L rather than &impl Fn(ModeId) -> bool so the trait acts as a documented seam between host and renderer; the monomorphisation cost is the same.