pub struct StatusBufferState {
pub buffer_id: BufferId,
pub store: Arc<BufferStoreHandle>,
pub workdir: PathBuf,
pub runtime: Handle,
pub pending_highlights: Option<Arc<PendingSyntheticHighlights>>,
pub expanded: HashMap<String, usize>,
pub headerline: Option<MagitHeaderlineHandle>,
pub config: Option<Arc<ConfigRegistry>>,
pub pending_cursor: Option<HunkRestore>,
pub cursor_bus: Option<CursorBusHandle>,
pub lang_registry: Option<Arc<LangRegistry>>,
}Fields§
§buffer_id: BufferId§store: Arc<BufferStoreHandle>§workdir: PathBuf§runtime: Handle§pending_highlights: Option<Arc<PendingSyntheticHighlights>>MG.2: optional handle to store styled spans after async edit lands, so highlights appear without a keystroke.
expanded: HashMap<String, usize>Entries currently inline-expanded (file diff / stash show /
commit show), keyed by [entry_key], value = number of buffer
lines the expansion occupies.
MG.18d: a refresh no longer clears this. The rebuild carries
the open entries’ diffs (refresh::build_and_format), so the
map is replaced with counts recomputed from the text that was
actually written — staging a hunk makes a diff shorter, and a
carried-over count would then collapse the wrong rows.
headerline: Option<MagitHeaderlineHandle>MG.14: the buffer’s headerline — branch, ahead/behind, repo
name, dirty counts. Re-set by every refresh from the same
SectionIndex the body is built from.
config: Option<Arc<ConfigRegistry>>MG.22b: the config, not the value — read per refresh so a
:set magit.hunk.context-lines takes effect on the next gr
rather than only on reopen.
pending_cursor: Option<HunkRestore>MG.18d: where the cursor should land once the next refresh’s
text exists. Set by a mutation, consumed by the refresh it was
queued for — a later gr must not re-apply a stale jump.
cursor_bus: Option<CursorBusHandle>MG.18d: the wake-baked bus the resolved position goes back on.
lang_registry: Option<Arc<LangRegistry>>DS.3: the grammar registry, for syntax-highlighting the code inside an inline-expanded diff.
None in a harness without the service — the diff then renders
exactly as it did before syntax layering existed, which is the
degradation this feature is designed around rather than an
error path.
Auto Trait Implementations§
impl !RefUnwindSafe for StatusBufferState
impl !UnwindSafe for StatusBufferState
impl Freeze for StatusBufferState
impl Send for StatusBufferState
impl Sync for StatusBufferState
impl Unpin for StatusBufferState
impl UnsafeUnpin for StatusBufferState
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<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