MCPcopy Create free account
hub / github.com/Kethku/Pando / select_byte_range

Method select_byte_range

aspen/src/components/editor.rs:465–469  ·  view source on GitHub ↗

Select a range of byte indices. No-op if either index is not a char boundary.

(&mut self, start: usize, end: usize)

Source from the content-addressed store, hash-verified

463 ///
464 /// No-op if either index is not a char boundary.
465 pub fn select_byte_range(&mut self, start: usize, end: usize) {
466 if self.buffer.is_char_boundary(start) && self.buffer.is_char_boundary(end) {
467 self.set_selection(Selection::new(self.cursor_at(start), self.cursor_at(end)));
468 }
469 }
470
471 /// If the current selection is not collapsed, returns the text content of
472 /// that selection.

Callers

nothing calls this directly

Calls 2

set_selectionMethod · 0.80
cursor_atMethod · 0.80

Tested by

no test coverage detected