Don't store rightmost row/char-column as a Point

This commit is contained in:
Antonio Scandurra
2021-05-20 12:52:58 +02:00
parent 995b80ff26
commit 6a0757ebf9
3 changed files with 28 additions and 16 deletions
+3 -2
View File
@@ -68,7 +68,7 @@ impl FoldMap {
}
pub fn rightmost_row(&self, ctx: &AppContext) -> u32 {
self.sync(ctx).summary().display.rightmost_point.row
self.sync(ctx).summary().display.rightmost_row
}
pub fn folds_in_range<'a, T>(
@@ -340,7 +340,8 @@ impl FoldMap {
lines,
first_line_chars: chars,
last_line_chars: chars,
rightmost_point: Point::new(0, chars),
rightmost_row: 0,
rightmost_row_chars: chars,
},
buffer: buffer.text_summary_for_range(fold.start..fold.end),
},