pub struct ChangeOperator;Expand description
Change operator - cuts text and signals insert mode.
Behavior:
- Deletes text in the given range
- Stores deleted text in the unnamed register (or specified register)
- Signals that insert mode should be entered (via return value or event)
Note: The actual mode change is handled by the caller (server/display driver). The operator just deletes the text.
§Example
ⓘ
let change = ChangeOperator;
change.execute(&mut ctx, range)?;
// Caller should now enter insert modeTrait Implementations§
Source§impl Clone for ChangeOperator
impl Clone for ChangeOperator
Source§fn clone(&self) -> ChangeOperator
fn clone(&self) -> ChangeOperator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChangeOperator
impl Debug for ChangeOperator
Source§impl Operator for ChangeOperator
impl Operator for ChangeOperator
Source§fn execute(
&self,
ctx: &mut OperatorContext<'_>,
range: Range,
) -> Result<(), OperatorError>
fn execute( &self, ctx: &mut OperatorContext<'_>, range: Range, ) -> Result<(), OperatorError>
Execute the operator on a range. Read more
Source§fn is_linewise(&self) -> bool
fn is_linewise(&self) -> bool
Whether this operator works on whole lines (dd, yy). Read more
Source§fn is_text_modifying(&self) -> bool
fn is_text_modifying(&self) -> bool
Whether this operator modifies text. Read more
impl Copy for ChangeOperator
Auto Trait Implementations§
impl Freeze for ChangeOperator
impl RefUnwindSafe for ChangeOperator
impl Send for ChangeOperator
impl Sync for ChangeOperator
impl Unpin for ChangeOperator
impl UnsafeUnpin for ChangeOperator
impl UnwindSafe for ChangeOperator
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
Mutably borrows from an owned value. Read more