Stop at range.end when computing text summary for range in TabMap

This commit is contained in:
Antonio Scandurra 2021-11-18 09:52:05 +01:00
parent 213aa36e1c
commit b10c82c015

View file

@ -130,7 +130,7 @@ impl Snapshot {
last_line_chars = first_line_chars;
} else {
for _ in self
.chunks(TabPoint::new(range.end.row(), 0)..self.max_point(), false)
.chunks(TabPoint::new(range.end.row(), 0)..range.end, false)
.flat_map(|chunk| chunk.text.chars())
{
last_line_chars += 1;