pub struct TerminalVisualState {
pub kind: VisualKind,
pub anchor_line: i32,
pub anchor_col: u16,
pub head_line: i32,
pub head_col: u16,
}Expand description
T3.b.2 (2026-05-25, extended T3.b.2.b): Visual-mode
selection over a terminal’s cell grid. Lines are alacritty
grid coords (negative = scrollback history; positive = live
screen); cols are cell columns. Stored on
TerminalBuffer::visual while the user is in
Terminal-Visual mode; None otherwise.
Linewise entries leave the columns at 0; renderers and the
yank text extractor ignore them. Charwise / blockwise track
both axes — see VisualKind.
Fields§
§kind: VisualKind§anchor_line: i32Where the selection started — set on v / V / <C-v>
entry.
anchor_col: u16§head_line: i32Where the head is — moves with h / j / k / l,
scroll, gg / G, etc.
head_col: u16Implementations§
Source§impl TerminalVisualState
impl TerminalVisualState
Sourcepub fn line_range(self) -> (i32, i32)
pub fn line_range(self) -> (i32, i32)
Inclusive [min, max] of the two endpoint lines so
renderers can iterate the selected rows regardless of
which direction the user dragged.
Sourcepub fn block_col_range(self) -> (u16, u16)
pub fn block_col_range(self) -> (u16, u16)
Inclusive [min, max] of the two endpoint columns —
only meaningful for Block selections (chars and lines
don’t use a rectangular column window).
Trait Implementations§
Source§impl Clone for TerminalVisualState
impl Clone for TerminalVisualState
Source§fn clone(&self) -> TerminalVisualState
fn clone(&self) -> TerminalVisualState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TerminalVisualState
Source§impl Debug for TerminalVisualState
impl Debug for TerminalVisualState
impl Eq for TerminalVisualState
Source§impl PartialEq for TerminalVisualState
impl PartialEq for TerminalVisualState
impl StructuralPartialEq for TerminalVisualState
Auto Trait Implementations§
impl Freeze for TerminalVisualState
impl RefUnwindSafe for TerminalVisualState
impl Send for TerminalVisualState
impl Sync for TerminalVisualState
impl Unpin for TerminalVisualState
impl UnsafeUnpin for TerminalVisualState
impl UnwindSafe for TerminalVisualState
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,
§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.