pub enum InsertReason {
Enter(InsertEntry),
Open {
above: bool,
},
AfterChange,
DeleteToEol,
ReplayOnly,
BlockEdge {
top: usize,
bot: usize,
col: usize,
},
BlockChange {
top: usize,
bot: usize,
col: usize,
},
Replace,
}Variants§
Enter(InsertEntry)
Plain entry via i/I/a/A — recorded as InsertAt.
Open
Entry via o/O — records OpenLine on Esc.
AfterChange
Entry via an operator’s change side-effect. Retro-fills the
stored last-change’s inserted field on Esc.
DeleteToEol
Entry via C (delete to EOL + insert).
ReplayOnly
Entry via an insert triggered during dot-replay — don’t touch last_change because the outer replay will restore it.
BlockEdge
I or A from VisualBlock: insert the typed text at col on
every row in top..=bot. col is the start column for I, the
one-past-block-end column for A.
BlockChange
c from VisualBlock: block content deleted, then user types
replacement text replicated across all block rows on Esc. Cursor
advances to the last typed char after replication (unlike BlockEdge
which leaves cursor at the insertion column).
Replace
R — Replace mode. Each typed char overwrites the cell under
the cursor instead of inserting; at end-of-line the session
falls through to insert (same as vim).
Trait Implementations§
Source§impl Clone for InsertReason
impl Clone for InsertReason
Source§fn clone(&self) -> InsertReason
fn clone(&self) -> InsertReason
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 InsertReason
impl RefUnwindSafe for InsertReason
impl Send for InsertReason
impl Sync for InsertReason
impl Unpin for InsertReason
impl UnsafeUnpin for InsertReason
impl UnwindSafe for InsertReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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