This commit is contained in:
Mikayla Maki 2023-02-27 11:38:09 -08:00
parent 37a2ef9d41
commit e0f553c0f5
3 changed files with 29 additions and 56 deletions

View file

@ -746,7 +746,7 @@ impl DisplayRow {
DisplayRow(display_row)
}
pub fn to_line_span(&self, display_map: &DisplaySnapshot) -> Range<DisplayPoint> {
pub fn to_points(&self, display_map: &DisplaySnapshot) -> Range<DisplayPoint> {
self.start()..self.end(&display_map)
}
@ -762,11 +762,6 @@ impl DisplayRow {
}
}
// TODO: Remove and use next_row
fn next_unchecked(&self) -> Option<DisplayRow> {
Some(DisplayRow(self.0 + 1))
}
pub fn next_rows(
&self,
display_map: &DisplaySnapshot,
@ -788,7 +783,7 @@ impl DisplayRow {
if current == None {
current = Some(start);
} else {
current = current.unwrap().next_unchecked();
current = Some(DisplayRow(current.unwrap().0 + 1))
}
if current.unwrap().0 > end_row.0 {
None