diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs index 7033cb78d764b6403116b7a4ddf9196023190358..28de6ad84dcf70defee170fca3c6292de2a757f0 100644 --- a/crates/multi_buffer/src/multi_buffer.rs +++ b/crates/multi_buffer/src/multi_buffer.rs @@ -3291,6 +3291,7 @@ impl MultiBuffer { Some(ExcerptRange::new(start_ix..end_ix)) }) .collect::>(); + // todo!() mutate excerpts more realistically? log::info!( "Inserting excerpts from buffer {} and ranges {:?}: {:?}", buffer_handle.read(cx).remote_id(), diff --git a/crates/multi_buffer/src/path_key.rs b/crates/multi_buffer/src/path_key.rs index 5bcfa9a6c7bd881b9e3acc970950825db1fb768a..0592e442ee8e146eac59cf014cf3deb44f3d28e0 100644 --- a/crates/multi_buffer/src/path_key.rs +++ b/crates/multi_buffer/src/path_key.rs @@ -185,6 +185,10 @@ impl MultiBuffer { direction: ExpandExcerptDirection, cx: &mut Context, ) { + if line_count == 0 { + return; + } + let snapshot = self.snapshot(cx); let mut sorted_anchors = anchors .into_iter()