pub struct MinibufferFocus {
pub focused_buffer: BufferId,
pub prior_buffer_id: BufferId,
pub prior_active_buffer: BufferKind,
pub prior_cursor: Position,
pub prior_scroll: u32,
pub prior_leftcol: u32,
pub prior_modal: ModalState,
pub expanded: bool,
}Expand description
MB.1 / MB.5a (rich minibuffer): the editing state suspended while a
minibuffer prompt (: command line or /·? search line) owns
self.document. When a prompt opens,
[Editor::focus_editing_buffer] swaps self.document /
document_buffer_id / active_buffer to the synthetic
*command-line* / *search-line* buffer and stashes the prior
editing focus here without touching the pane tree (the active
pane keeps rendering its own buffer). [Editor::restore_editing_buffer]
pops it back on submit / cancel. Some(_) is the “a prompt is
focused” flag; whether it’s the command line vs the search line is
decided by Editor::search_line (command_line_active /
search_line_active). Prompt-agnostic by design so git-commit-line
/ repl-input reuse it unchanged (design §6).
Fields§
§focused_buffer: BufferIdFS.1b: the buffer this frame FOCUSED — the surface itself, not what it took focus from.
It is what lets a focus tell “I am nesting inside the thing that has
focus” from “I am REPLACING it”. A prompt opening while a prompt is
focused is the second: two frames would mean two restores, and the
first <CR> would land the user back in the previous prompt instead
of their file.
prior_buffer_id: BufferIdThe document buffer that was focused for editing before the
: line took over. Restored (re-fetched from the registry by
id) when the command line closes.
prior_active_buffer: BufferKindKind of the prior active buffer (Document / Messages / …).
prior_cursor: PositionCursor in the prior buffer at focus time.
prior_scroll: u32Scroll (first visible line) of the prior buffer at focus time.
prior_leftcol: u32Horizontal scroll of the prior buffer at focus time.
prior_modal: ModalStateModal state at focus time, restored on close.
expanded: boolMB.2: whether the : line is expanded into the full-modal
mini-buffer band (<C-x><C-e>). Tier 1 (false): the one-row
readline : line under ModalState::Command. Tier 2 (true):
the same *command-line* surface grown in place with the full vim
grammar (real Normal / Insert / Visual). Collapsing returns the
edited text to the one-row line for review.
Trait Implementations§
Source§impl Clone for MinibufferFocus
impl Clone for MinibufferFocus
Source§fn clone(&self) -> MinibufferFocus
fn clone(&self) -> MinibufferFocus
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 Freeze for MinibufferFocus
impl RefUnwindSafe for MinibufferFocus
impl Send for MinibufferFocus
impl Sync for MinibufferFocus
impl Unpin for MinibufferFocus
impl UnsafeUnpin for MinibufferFocus
impl UnwindSafe for MinibufferFocus
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