mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
editor: Improve performance of buffer/project search (#15109)
Fixes #15102 Release Notes: - Improved performance of project and buffer search when there are many matches.
This commit is contained in:
parent
65c63defcc
commit
325e6b9fef
@ -10859,17 +10859,6 @@ impl Editor {
|
||||
color_fetcher: fn(&ThemeColors) -> Hsla,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
let snapshot = self.snapshot(cx);
|
||||
// this is to try and catch a panic sooner
|
||||
for range in ranges {
|
||||
snapshot
|
||||
.buffer_snapshot
|
||||
.summary_for_anchor::<usize>(&range.start);
|
||||
snapshot
|
||||
.buffer_snapshot
|
||||
.summary_for_anchor::<usize>(&range.end);
|
||||
}
|
||||
|
||||
self.background_highlights
|
||||
.insert(TypeId::of::<T>(), (color_fetcher, Arc::from(ranges)));
|
||||
self.scrollbar_marker_state.dirty = true;
|
||||
|
Loading…
Reference in New Issue
Block a user