Skip to main content

insert_text

Function insert_text 

Source
pub fn insert_text(
    buf: &mut TextBuffer,
    cur: &mut TextCursor,
    undo: &mut UndoStack,
    at_byte: usize,
    text: &str,
)
Expand description

Insert text at at_byte (must be a char boundary; producers clamp via TextPos::from_byte), moving caret + anchor past the insertion and recording an undo entry. Public so lumen-input’s keystroke router can mutate the buffer through the same single implementation the request mutator uses.