pub struct ModelineRenderState {
pub cmdline_text: Arc<str>,
pub prompt_text: Arc<str>,
pub auto_submit_hint: bool,
pub search_pattern: Option<Arc<str>>,
pub search_direction: Option<SearchDirection>,
pub cmdline_expanded: bool,
pub cmdline_full_text: Arc<str>,
pub cmdline_expand_height: ExpandHeight,
pub cmdline_decorations: Option<CommandLineDecorations>,
}Expand description
Modeline status (cmdline text, search indicator, mode hints).
Slice 3c.final.B.7: populates the per-frame fields the
renderer reads through read_editor today (cmdline text,
search pattern + direction, auto-submit hint). The active mode
chain remains via the existing active_modes lookup; future
slices may lift that here too.
Fields§
§cmdline_text: Arc<str>Renderer-side cmdline text. Arc<str> so per-publish clone
is one Arc bump regardless of length.
prompt_text: Arc<str>MG.51: the *prompt-line* buffer’s text while ModalState::Prompt
is live (Effect::OpenPrompt — magit’s branch checkout, tag name,
…), empty otherwise.
Published rather than read off the active document by each peer,
because open_prompt_line splits the prompt across two places —
the LABEL goes to the echo, the typed text to this buffer — and a
renderer that knows only about the echo draws the label with no
input under it, which is exactly the bug this field fixes. One
field, both peers, and GPUI’s bottom_row_content stays pure.
auto_submit_hint: bool:describe-key<CR> armed the chord-capture prompt; the
renderer paints a “press a chord” hint after the cursor.
search_pattern: Option<Arc<str>>/ or ? search pattern; None when no search is in
flight. Arc<str> for the same reason as cmdline_text.
search_direction: Option<SearchDirection>/ (forward) or ? (backward); accompanies
search_pattern and is None whenever search_pattern is.
cmdline_expanded: boolMB.2: true while the : line is expanded into the tier-2
mini-buffer band; the renderer grows the echo row into a band and
draws Self::cmdline_full_text instead of the one-row line.
cmdline_full_text: Arc<str>MB.2: the full (possibly multi-line) : line text, for the
expanded band. Empty / unused in tier 1 (the one-row cmdline_text
carries the single line there).
cmdline_expand_height: ExpandHeightMB.2e: the resolved command-line.expand-height policy. The
renderer applies it to the live frame height (ExpandHeight::rows)
to size the expanded band. Published (not read at draw time) so the
draw path stays free of config reads.
cmdline_decorations: Option<CommandLineDecorations>MB.4: live : line decorations — syntax spans, a validation
error, and a parameter hint. Produced off the render thread
(refresh_command_line_decorations) and read here at draw time.
None when the command line is closed / bare.
Trait Implementations§
Source§impl Clone for ModelineRenderState
impl Clone for ModelineRenderState
Source§fn clone(&self) -> ModelineRenderState
fn clone(&self) -> ModelineRenderState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelineRenderState
impl Debug for ModelineRenderState
Auto Trait Implementations§
impl Freeze for ModelineRenderState
impl RefUnwindSafe for ModelineRenderState
impl Send for ModelineRenderState
impl Sync for ModelineRenderState
impl Unpin for ModelineRenderState
impl UnsafeUnpin for ModelineRenderState
impl UnwindSafe for ModelineRenderState
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