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

Method set

src/editor/cursor.rs:23–28  ·  view source on GitHub ↗
(self, line: usize, column: usize, document: &Document)

Source from the content-addressed store, hash-verified

21 }
22
23 pub fn set(self, line: usize, column: usize, document: &Document) -> Self {
24 let mut cursor = Self::new(line, column);
25 cursor.clamp_to_document(document);
26 cursor.preferred_column = cursor.column;
27 cursor
28 }
29
30 pub fn set_position_from_char(self, char_idx: usize, document: &Document) -> Self {
31 let (line, column) = document.char_to_position(char_idx);

Callers 4

set_cursorMethod · 0.80
delete_char_backwardMethod · 0.80
take_selectionMethod · 0.80

Calls 1

clamp_to_documentMethod · 0.80

Tested by

no test coverage detected