pub struct OperatorContext<'a> {
pub kernel: &'a KernelContext,
pub registers: &'a mut RegisterBank,
pub clipboard_history: &'a mut HistoryRing,
pub buffer_id: BufferId,
pub register: Register,
pub count: usize,
pub cursor_position: Position,
pub cursor_after: Option<Position>,
}Expand description
Context passed to operator execution.
Fields§
§kernel: &'a KernelContextKernel context for accessing services.
registers: &'a mut RegisterBankPer-client register storage (#515).
clipboard_history: &'a mut HistoryRingPer-client clipboard history (#515).
buffer_id: BufferIdBuffer to operate on.
register: RegisterTarget register for operator output.
count: usizeCount prefix (e.g., 3dd has count 3).
cursor_position: PositionCursor position before operator execution (for undo tracking).
This is passed from the caller who has access to window state.
Used to record cursor_before for undo.
cursor_after: Option<Position>Cursor position the operator requests after execution.
Set by operators during execute() to communicate desired post-operation
cursor position. None means the caller applies a default clamped fallback.
This makes OperatorContext a bidirectional channel — consistent with
registers and clipboard_history which are also mutated during execute.
Auto Trait Implementations§
impl<'a> Freeze for OperatorContext<'a>
impl<'a> !RefUnwindSafe for OperatorContext<'a>
impl<'a> Send for OperatorContext<'a>
impl<'a> Sync for OperatorContext<'a>
impl<'a> Unpin for OperatorContext<'a>
impl<'a> UnsafeUnpin for OperatorContext<'a>
impl<'a> !UnwindSafe for OperatorContext<'a>
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