pub struct MarkSnapshot {
pub local_marks: BTreeMap<char, (usize, usize)>,
pub jump_back: Vec<(usize, usize)>,
pub jump_fwd: Vec<(usize, usize)>,
pub change_last_edit: Option<(usize, usize)>,
pub change_list: Vec<(usize, usize)>,
pub change_cursor: Option<usize>,
pub global_marks: BTreeMap<char, (usize, usize)>,
}Expand description
Buffer-scoped “edit coherence” state snapshotted alongside a
UndoEntry’s rope so undo/redo can restore marks, not just text.
Positions are plain (row, col) (or (row, col) values keyed by
mark char) — no buffer-id tagging needed here even for
global_marks, because a MarkSnapshot always belongs to exactly
one buffer’s undo stack; the engine is responsible for reattaching
its own buffer_id when writing entries back into the session-global
marks map (see Editor::restore_marks).
Fields§
§local_marks: BTreeMap<char, (usize, usize)>ma-mz local marks (View::marks_cloned).
jump_back: Vec<(usize, usize)>Back-jumplist (Ctrl-o stack), newest at the back.
jump_fwd: Vec<(usize, usize)>Forward-jumplist (Ctrl-i stack), newest at the back.
change_last_edit: Option<(usize, usize)>`. / '. — position of the most recent change.
change_list: Vec<(usize, usize)>Changelist ring (g; / g,).
change_cursor: Option<usize>Walk cursor into change_list; None outside a walk.
global_marks: BTreeMap<char, (usize, usize)>mA-mZ global marks that belong to THIS buffer (bare
(row, col) — the buffer-id is implicit, this buffer).
Trait Implementations§
Source§impl Clone for MarkSnapshot
impl Clone for MarkSnapshot
Source§fn clone(&self) -> MarkSnapshot
fn clone(&self) -> MarkSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more