pub struct InsertSession {
pub count: usize,
pub row_min: usize,
pub row_max: usize,
pub before_rope: Rope,
pub reason: InsertReason,
pub start_row: usize,
pub start_col: usize,
pub backspaces: usize,
pub deleted: isize,
pub wraps: Vec<InsertWrap>,
}Fields§
§count: usize§row_min: usizeMin/max row visited during this session. Widens on every key.
row_max: usize§before_rope: RopeO(1) rope snapshot of the full buffer at session entry. Used to
diff the affected row window at finish without being fooled by
cursor navigation through rows the user never edited.
ropey::Rope::clone is Arc-clone — no byte copying.
reason: InsertReason§start_row: usize(row, col) where the insert session began (char-indexed). Abbreviation
expansion uses start_col as mincol — only chars at or after this
column on start_row are eligible as part of the lhs match, so
pre-existing buffer text is never consumed by expansion.
start_col: usize§backspaces: usize<BS> / <C-h> presses that deleted at or before the insert’s start
(vim’s Insstart). Each one moves start_row / start_col back to
where it left the cursor, as vim moves Insstart, and . replays
them before retyping, as vim’s redo buffer does.
deleted: isizeCharacters those backspaces removed, net of any spaces a
'softtabstop' delete put back — what the typed text’s length is
measured against when the session ends.
wraps: Vec<InsertWrap>The line breaks 'formatoptions' t put in while typing, oldest
first. vim’s redo holds the typed keys, not the breaks, so the
session takes them back out when it reads what was typed.
Trait Implementations§
Source§impl Clone for InsertSession
impl Clone for InsertSession
Source§fn clone(&self) -> InsertSession
fn clone(&self) -> InsertSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more