Skip to main content

edit_text_multi

Function edit_text_multi 

Source
pub fn edit_text_multi(
    content: &[InlineContent],
    selections: &[Selection],
    texts: &[&str],
) -> (Vec<InlineContent>, Vec<Selection>)
Expand description

Edit text with different text per selection (for N-lines-to-N-cursors paste).

Each selection gets its own text inserted. Selections are processed back-to-front to avoid index invalidation. Returns the new content and updated cursors.

ยงPanics

Panics if texts.len() != selections.len().