Autoscroll when folding an arbitrary range

This commit is contained in:
Antonio Scandurra 2021-05-07 18:15:00 +02:00
parent 8bbaa0bd34
commit 806c09bf11

View file

@ -1952,9 +1952,8 @@ impl BufferView {
.selections(ctx.as_ref())
.iter()
.map(|s| s.range(buffer).sorted())
.collect::<Vec<_>>();
self.display_map.fold(ranges, ctx.as_ref()).unwrap();
ctx.notify();
.collect();
self.fold_ranges(ranges, ctx);
}
fn fold_ranges<T: ToOffset>(&mut self, ranges: Vec<Range<T>>, ctx: &mut ViewContext<Self>) {