Task indicators in multibuffers (#11603)

Following #11487 the task indicators would no longer show up in
multibuffers.
Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-05-09 12:22:33 +02:00 committed by GitHub
parent fdcedf15b7
commit 76535578e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 83 additions and 60 deletions

View file

@ -3168,7 +3168,7 @@ impl MultiBufferSnapshot {
pub fn runnable_ranges(
&self,
range: Range<Anchor>,
) -> impl Iterator<Item = (Range<usize>, Runnable)> + '_ {
) -> impl Iterator<Item = (BufferId, Range<usize>, Runnable)> + '_ {
let range = range.start.to_offset(self)..range.end.to_offset(self);
self.excerpts_for_range(range.clone())
.flat_map(move |(excerpt, excerpt_offset)| {
@ -3183,10 +3183,10 @@ impl MultiBufferSnapshot {
excerpt_offset + (match_range.start - excerpt_buffer_start);
match_range.end = excerpt_offset + (match_range.end - excerpt_buffer_start);
(match_range, runnable)
(excerpt.buffer_id, match_range, runnable)
})
.skip_while(move |(match_range, _)| match_range.end < range.start)
.take_while(move |(match_range, _)| match_range.start < range.end)
.skip_while(move |(_, match_range, _)| match_range.end < range.start)
.take_while(move |(_, match_range, _)| match_range.start < range.end)
})
}