fix line_end_char_index() documentation

pull/10658/head
Pantos 7 months ago
parent 752ed8eb15
commit 9fbe75afed

@ -195,7 +195,7 @@ pub fn get_line_ending_of_str(line: &str) -> Option<LineEnding> {
} }
} }
/// Returns the char index of the end of the given line, not including its line ending. /// Returns the char index of the end of the given line.
pub fn line_end_char_index(slice: &RopeSlice, line: usize) -> usize { pub fn line_end_char_index(slice: &RopeSlice, line: usize) -> usize {
slice.line_to_char(line + 1) slice.line_to_char(line + 1)
- get_line_ending(&slice.line(line)) - get_line_ending(&slice.line(line))

Loading…
Cancel
Save