pub struct OptionCache {Show 26 fields
pub show_line_numbers: bool,
pub relative_line_numbers: bool,
pub wrap_lines: bool,
pub sign_column: bool,
pub ignorecase: bool,
pub tabstop: u32,
pub foldenable: bool,
pub foldmethod: FoldMethod,
pub scrolloff: u32,
pub scroll_lines: u32,
pub startofline: bool,
pub sidescroll: u32,
pub sidescrolloff: u32,
pub completion_auto_insert_single: bool,
pub show_whitespace: bool,
pub current_line_highlight: bool,
pub whitespace_tab: Option<char>,
pub whitespace_trailing: Option<char>,
pub whitespace_leading: Option<char>,
pub whitespace_space: Option<char>,
pub whitespace_eol: Option<char>,
pub indent_guide_char: Option<char>,
pub indent_guide_active: bool,
pub terminal_esc_exits: bool,
pub scrollbind: bool,
pub content_left_pad: u32,
}Expand description
Hot-path option cache. Mirrors the typed-options registry’s
resolved values for the active buffer; reads on this struct
fire on every render tick, so the cache exists to skip a
HashMap lookup per option. Repopulated by
App::rebuild_option_cache after every :set.
Fields§
§show_line_numbers: bool§relative_line_numbers: bool§wrap_lines: bool§sign_column: boolPU.1b-1a (signcolumn): whether the renderer reserves the
gutter sign columns (diagnostics severity + diff sign). true
(default) always reserves them so layout never shifts when a
sign appears; false (help / synthetic buffers) renders
gutterless. Resolved from the SignColumnOption typed option —
the renderer reads only this flag, never the buffer kind.
ignorecase: bool§tabstop: u32§foldenable: bool§foldmethod: FoldMethod§scrolloff: u32§scroll_lines: u32VM.3j-2 (:set scroll): lines <C-d> / <C-u> move. 0 means
half the window.
startofline: boolVM.3f (:set startofline): H / M / L land on the first
non-blank; off keeps the cursor’s column.
sidescroll: u32Horizontal scroll step (:set sidescroll). 0 jump-scrolls
the cursor to the window centre; positive scrolls N columns.
sidescrolloff: u32Horizontal scroll-off margin (:set sidescrolloff).
completion_auto_insert_single: bool§show_whitespace: bool§current_line_highlight: bool§whitespace_tab: Option<char>§whitespace_trailing: Option<char>§whitespace_leading: Option<char>§whitespace_space: Option<char>§whitespace_eol: Option<char>§indent_guide_char: Option<char>IG.3: display.indent-guides.char, the glyph the TUI substitutes
into a guide column. None (empty string) ⇒ the TUI draws no
guides. The GPU peer paints a rule and ignores this.
indent_guide_active: boolIG.3: display.indent-guides.active — draw the block enclosing
the cursor in its own style. Whether guides exist at all is
display.indent-guides, which is resolved by the worker (it
changes what gets built, not how it is painted).
terminal_esc_exits: boolTerminal-mode T2.b.0 (2026-05-25): cached
terminal.esc-exits. Default true so test fixtures
using Editor::default() (no init_from_linkme) get
the production semantics without panicking on an
unregistered option lookup.
scrollbind: boolD.0b: cached scrollbind. Triggers
rebuild_scrollbind_group via apply_option_cascade
when toggled.
content_left_pad: u32DB.4: extra leading gutter cells to horizontally centre the active
buffer’s content (dashboard). (viewport_width - content_block_width)/2,
recomputed on activation + resize. 0 = not centred (the default for
every buffer). The renderer adds this to the gutter width so content +
cursor shift right with no text mutation.
Trait Implementations§
Source§impl Clone for OptionCache
impl Clone for OptionCache
Source§fn clone(&self) -> OptionCache
fn clone(&self) -> OptionCache
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OptionCache
Source§impl Debug for OptionCache
impl Debug for OptionCache
Source§impl Default for OptionCache
impl Default for OptionCache
Source§fn default() -> OptionCache
fn default() -> OptionCache
Auto Trait Implementations§
impl Freeze for OptionCache
impl RefUnwindSafe for OptionCache
impl Send for OptionCache
impl Sync for OptionCache
impl Unpin for OptionCache
impl UnsafeUnpin for OptionCache
impl UnwindSafe for OptionCache
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