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:
1 parent
349a48d937
commit
40c62cda5f
1 file changed
+5
@@ -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