pub struct PaneCellsInputs {Show 28 fields
pub pane_id: PaneId,
pub buffer_id: BufferId,
pub matrix: Arc<ArcSwap<CellMatrix>>,
pub display_matrix: Arc<ArcSwap<DisplayMatrix>>,
pub indent_guides: Arc<ArcSwap<IndentGuides>>,
pub conceal_reveal_line: Option<u32>,
pub indent_unit: IndentUnit,
pub indent_guides_enabled: bool,
pub sticky_context_lines: Arc<[u32]>,
pub sticky_context_line_numbers: bool,
pub sticky_context_separator: Option<char>,
pub sticky_context: Arc<ArcSwap<StickyContext>>,
pub virtual_rows_matrix: Arc<ArcSwap<VirtualRowMatrix>>,
pub version: MatrixVersion,
pub snapshot: Option<Arc<DocumentSnapshot>>,
pub syntax_handle: Option<Arc<SyntaxHandle>>,
pub inlay_hints: Arc<[InlayHintRow]>,
pub folds: Arc<[Fold]>,
pub viewport_height: u32,
pub scroll: u32,
pub viewport_width: u32,
pub wrap: bool,
pub wrap_reserved_cols: u32,
pub foldenable: bool,
pub last_edit: Option<EditDelta>,
pub excerpt_syntax: Arc<[ExcerptSyntax]>,
pub extra_spans: Arc<[Vec<StyledSpan>]>,
pub extra_refine: Arc<[Vec<RefineSpan>]>,
}Expand description
last_edit is Some(delta) only for the active pane
(edits land on the active document; the publish path
take()s Editor::last_edit_for_cells exactly once);
non-active panes always carry None so the worker
conservatively full-rebuilds on text-version bumps for
those buffers. That is correct today because non-active
buffers don’t take edits in normal use; LSP-driven edits
to non-active buffers also flush through apply_edit
which clears the slot.
Fields§
§pane_id: PaneIdPaneTree leaf id. Stable across publishes until the
pane is closed or reorganised.
buffer_id: BufferIdDocument buffer this pane is showing. Worker uses this as the registry key.
matrix: Arc<ArcSwap<CellMatrix>>Per-pane matrix output cell. Cloned from
Editor::cells_matrix_for(buffer_id) so worker
writes via cell.store(...) are visible through
every later render_state.load_full(). Active-pane
entries share Arc identity with
CellsRenderState::matrix.
display_matrix: Arc<ArcSwap<DisplayMatrix>>B2.1 (2026-06-04): per-pane per-line display-matrix output
cell. Cloned from Editor::display_matrix_for(buffer_id) so
worker writes via cell.store(...) are visible through every
later render_state.load_full(). Active-pane entries share
Arc identity with CellsRenderState::display_matrix.
indent_guides: Arc<ArcSwap<IndentGuides>>IG.2 (2026-08-16): per-pane indentation-guide output cell.
Cloned from Editor::indent_guides_for(buffer_id). Written in
the same worker pass that writes Self::display_matrix, from
the same snapshot and with the same version stamp — the two are
two projections of one build, not two caches.
conceal_reveal_line: Option<u32>H.4 (2026-08-29): this pane renders links raw rather than concealed. True iff the editor is in Insert/Replace and this pane holds the buffer being edited.
The active-pane condition is not incidental. ModalState is
editor-global, so revealing on the mode alone would repaint every
visible org buffer in every split the moment you pressed i in
one of them — a pixel change to content the user did not touch,
which is the standing veto. A pane that is not being edited has
no reason to show editing affordances.
CL.1: the ONE line whose conceals are suppressed, or None.
Was a buffer-wide bool: pressing i revealed every link in the
buffer at once, which is not what any editor does. Vim scopes reveal to
the cursor LINE (concealcursor), because the reason to reveal is to
edit the thing under the cursor — the other forty links on screen have
no reason to turn back into [[id:…][…]].
A line rather than a bool is also what keeps this affordable: the two
lines whose reveal state changed are rebuilt incrementally and every
other row is Arc-reused, so a cursor move costs two rows instead of a
window.
indent_unit: IndentUnitIG.2: this buffer’s resolved indent level. Guides are spaced by
shiftwidth (one level of indent), not by tabstop (the width
of a tab byte); tabstop is here too because measuring a
tab-indented line’s depth in display columns needs it.
indent_guides_enabled: boolIG.2: display.indent-guides for this buffer. false publishes
the empty layer rather than skipping the write, so turning guides
off clears them on the next publish instead of leaving the last
build painted.
sticky_context_lines: Arc<[u32]>TC.3b: the source lines this pane pins above its text, resolved
HOST-side from the cached scopes + this pane’s anchor and viewport
(lattice_cells::context::resolve_context). The host produces this
list and reserves exactly len() rows for it, so the reservation
and the paint cannot drift — the failure mode the gutter-width
mismatch taught, designed out rather than tested for.
sticky_context_line_numbers: boolTC.8: whether those rows show source line numbers
(context.line-numbers). Resolved host-side with the lines so the
worker stamps it onto the layer it builds and neither renderer reads a
plugin option.
sticky_context_separator: Option<char>TC.12: context.separator’s glyph, resolved host-side.
sticky_context: Arc<ArcSwap<StickyContext>>TC.3b: per-PANE sticky-context output cell. Keyed by pane id, not
buffer id, because the rows genuinely differ per pane: one buffer in
two splits with cursors in different scopes must show different
context. Cloned from Editor::sticky_context_for(pane_id).
virtual_rows_matrix: Arc<ArcSwap<VirtualRowMatrix>>D.4.d.2.1.b (2026-05-29): per-pane virtual-rows matrix
output cell. Cloned from
Editor::virtual_rows_matrix_for(buffer_id) so the
virtual-rows worker (D.4.d.2.1.c) can write via
cell.store(...) and have the writes visible
through every later render_state.load_full().
Active-pane entries share Arc identity with
crate::editor::Editor::virtual_rows_matrix_cell
(boot-seeded invariant from D.4.d.2.0) so the
existing single-document read path through
VirtualRowsRenderState::matrix keeps landing on
the worker’s writes for the active pane until
D.4.d.2.1.d switches the renderer to a per-pane
lookup.
version: MatrixVersionAggregate version for this pane’s inputs. Worker
compares against matrix.load().version to
short-circuit cache hits per pane.
snapshot: Option<Arc<DocumentSnapshot>>Document snapshot for buffer_id. None when the
buffer is missing from the registry (transient race
during close); the worker treats None as “skip,
matrix unchanged.”
syntax_handle: Option<Arc<SyntaxHandle>>Syntax handle for buffer_id, if any. Resolves
through Editor::document_syntax_for so non-active
buffers carrying a parsed Syntax are still themed.
inlay_hints: Arc<[InlayHintRow]>Flattened inlay hints for buffer_id. Empty when
lsp-inlay-hint-mode is off for this buffer or no
hints have arrived.
folds: Arc<[Fold]>Fold ranges for buffer_id. Sourced from
buffer_locals[buffer_id].DocumentFolds.
viewport_height: u32Pane-local visible-buffer height. Sourced from
PaneState.viewport_height (Issue #25). Drives the
worker’s chunked-mode threshold.
scroll: u32Pane-local first visible source line. For the active pane this
is Editor::scroll; inactive panes carry their stashed
PaneState.scroll. H.3 (2026-06-04): the cells worker windows
the chunked-mode matrix around [scroll, scroll + viewport_height) (plus overscan) rather than building the
whole document, so large-file build + rebuild are O(viewport)
not O(file). H.3a plumbs the field; H.3b makes the worker read
it. Mirrors the long-standing SyntaxRenderState.scroll
precedent for the legacy windowed-highlight path.
viewport_width: u32Pane-local visible-buffer width in columns. Sourced from
PaneState.viewport_width. Soft-wrap (W.1): the cells
worker stamps CellMatrix.wrap_width from this when wrap
is on (W.2). 0 means “not yet laid out”.
wrap: boolSoft-wrap (W.2): :set wrap resolved for this pane’s
buffer. When true (and viewport_width > 0) the cells
worker stamps the published matrix’s wrap_width so
consumers expand each source line into ⌈col/width⌉
display rows. false ⇒ wrap_width stays 0 (one
display row per source line — the historical default).
wrap_reserved_cols: u32Columns reserved for this pane’s gutter (line-number column +
diagnostic + diff-sign cells). The cells worker subtracts
this from viewport_width to get the soft-wrap width, so
the stamped wrap_width — read by segment_count (the
vertical scroll clamp) and both renderers’ paint paths —
matches the width the renderer actually wraps body text at.
Without this the clamp under-counts wrapped display rows and
G clips the document tail. 0 for gutterless panes (the
floating popups). Computed via
crate::cells_worker::gutter_cols, shared with
crate::editor::Editor::body_text_width to keep the
vertical and horizontal clamps in lockstep.
foldenable: boolPer-pane foldenable. Global today (no per-buffer
setting); kept here so a future per-buffer
foldenable doesn’t require a substate reshape.
last_edit: Option<EditDelta>Single-edit delta for the incremental rebuild path.
Some(delta) only for the active pane on the publish
cycle when exactly one edit was applied; None
otherwise. See struct-level docstring.
excerpt_syntax: Arc<[ExcerptSyntax]>K.4.7 (2026-06-07): per-excerpt syntax entries for multibuffer panes. Empty for ordinary single-document panes.
extra_spans: Arc<[Vec<StyledSpan>]>PU.1b-2a: generic per-buffer static highlight spans (indexed
by source line), merged ON TOP OF the grammar spans in the
matrix build. Sourced from the buffer’s ExtraHighlights local
(help links; later, any non-grammar-derivable styling). Empty
[] for every buffer without the local — the merge is a no-op
then, so ordinary panes render byte-identically.
extra_refine: Arc<[Vec<RefineSpan>]>DR.3 (2026-08-12): per-line intra-line diff refinement — byte
ranges whose BACKGROUND overrides their row’s diff tint.
Sourced from the buffer’s ExtraRefinement local, published by
the same drain as extra_spans so the two cannot drift. Empty
[] for every buffer without it, so ordinary panes render
byte-identically.
Trait Implementations§
Source§impl Clone for PaneCellsInputs
impl Clone for PaneCellsInputs
Source§fn clone(&self) -> PaneCellsInputs
fn clone(&self) -> PaneCellsInputs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PaneCellsInputs
impl !UnwindSafe for PaneCellsInputs
impl Freeze for PaneCellsInputs
impl Send for PaneCellsInputs
impl Sync for PaneCellsInputs
impl Unpin for PaneCellsInputs
impl UnsafeUnpin for PaneCellsInputs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more