Fix early return when reaching end excerpt in lift_buffer_metadata (#26253)
Release Notes: - Fixed a bug causing slowness when viewing multi buffers with lots of excerpts
This commit is contained in:
@@ -3830,6 +3830,11 @@ impl MultiBufferSnapshot {
|
||||
// When there are no more metadata items for this excerpt, move to the next excerpt.
|
||||
else {
|
||||
current_excerpt_metadata.take();
|
||||
if let Some((end_excerpt_id, _)) = range_end {
|
||||
if excerpt.id == end_excerpt_id {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
cursor.next_excerpt();
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user