(self, line: usize, column: usize, document: &Document)
| 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); |
no test coverage detected