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:
parent
349a48d937
commit
40c62cda5f
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue