Skip to main content

PaneCellsInputs

Struct PaneCellsInputs 

Source
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: PaneId

PaneTree leaf id. Stable across publishes until the pane is closed or reorganised.

§buffer_id: BufferId

Document 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: IndentUnit

IG.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: bool

IG.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: bool

TC.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: MatrixVersion

Aggregate 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: u32

Pane-local visible-buffer height. Sourced from PaneState.viewport_height (Issue #25). Drives the worker’s chunked-mode threshold.

§scroll: u32

Pane-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: u32

Pane-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: bool

Soft-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: u32

Columns 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: bool

Per-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

Source§

fn clone(&self) -> PaneCellsInputs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PaneCellsInputs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> IntoMaybeUndefined<T> for T

§

fn into_maybe_undefined(self) -> MaybeUndefined<T>

Converts this value into a three-state builder argument.
§

impl<T> IntoOption<T> for T

§

fn into_option(self) -> Option<T>

Converts this value into an optional builder argument.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more