Change summary
crates/multi_buffer/src/multi_buffer.rs | 1 +
crates/multi_buffer/src/path_key.rs | 4 ++++
2 files changed, 5 insertions(+)
Detailed changes
@@ -3291,6 +3291,7 @@ impl MultiBuffer {
Some(ExcerptRange::new(start_ix..end_ix))
})
.collect::<Vec<_>>();
+ // todo!() mutate excerpts more realistically?
log::info!(
"Inserting excerpts from buffer {} and ranges {:?}: {:?}",
buffer_handle.read(cx).remote_id(),
@@ -185,6 +185,10 @@ impl MultiBuffer {
direction: ExpandExcerptDirection,
cx: &mut Context<Self>,
) {
+ if line_count == 0 {
+ return;
+ }
+
let snapshot = self.snapshot(cx);
let mut sorted_anchors = anchors
.into_iter()