Skip to main content

Module pane_group

Module pane_group 

Source
Expand description

D.4.a (2026-05-29): pane-group substrate.

See docs/dev/architecture/pane-groups.md for the full design; capsule:

  • A PaneGroup is a set of (pane, buffer) pairs that scroll together under a pluggable RowMapper.
  • Membership is keyed on the pair, not the pane alone, so the binding suspends naturally when the user switches a pane’s buffer away from its registered counterpart and resumes when they switch back.
  • Propagation runs at the dispatch tail ([crate::Editor::publish_render_state]); active pane drives, others follow.

This slice ships the trait + registry; consumers (HunkRowMapper in D.4.b, filler-row provider in D.4.c, :diffsplit wiring in D.4.d) land in later slices.

Structs§

IdentityRowMapper
D.4.a: default mapper for :set scrollbind parity. Maps every row to itself.
OffsetRowMapper
D.4.a: an offset-row stub mapper used by the unit tests to verify that the mapping path is actually plumbed (identity alone wouldn’t distinguish “mapper was called” from “mapper was bypassed”). Lives in non-test code so downstream slices can reuse it as a smoke-test mapper.
PaneGroup
D.4.a: one scroll-binding group.
PaneGroupMember
D.4.a: the (pane, buffer) pair a membership is keyed on. Propagation observes a pane’s currently-displayed buffer at dispatch tail and skips the member when it no longer matches buffer.

Traits§

RowMapper
D.4.a: pluggable row-mapping function for a pane group.