MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / delete_selection

Method delete_selection

src/editor/buffer.rs:346–358  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

344 }
345
346 fn delete_selection(&mut self) -> bool {
347 let cursor_before = self.cursor;
348 let (Some(start), deleted) = self.take_selection() else {
349 return false;
350 };
351 self.push_undo(UndoRecord {
352 start,
353 inserted: String::new(),
354 deleted,
355 cursor_before,
356 });
357 true
358 }
359
360 fn take_selection(&mut self) -> (Option<usize>, String) {
361 let Some((start, end)) = self.selection_range() else {

Callers 2

delete_char_forwardMethod · 0.80
delete_char_backwardMethod · 0.80

Calls 2

take_selectionMethod · 0.80
push_undoMethod · 0.80

Tested by

no test coverage detected