(&self, line: usize)
| 71 | } |
| 72 | |
| 73 | pub fn line_to_char(&self, line: usize) -> usize { |
| 74 | let line = line.min(self.line_count().saturating_sub(1)); |
| 75 | self.rope.line_to_char(line) |
| 76 | } |
| 77 | |
| 78 | pub fn char_to_line(&self, char_idx: usize) -> usize { |
| 79 | self.rope.char_to_line(char_idx.min(self.len_chars())) |
no test coverage detected