mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 08:02:12 +03:00
Address review feedback.
Rename selected_rows to background_highlight_row_ranges. Do not return any ranges if there are more than 50k results
This commit is contained in:
parent
b0fc6da55b
commit
371c669e00
@ -7549,7 +7549,7 @@ impl Editor {
|
||||
results
|
||||
}
|
||||
|
||||
pub fn selected_rows<T: 'static>(
|
||||
pub fn background_highlight_row_ranges<T: 'static>(
|
||||
&self,
|
||||
search_range: Range<Anchor>,
|
||||
display_snapshot: &DisplaySnapshot,
|
||||
@ -7616,7 +7616,9 @@ impl Editor {
|
||||
}
|
||||
// We might still have a hunk that was not rendered (if there was a search hit on the last line)
|
||||
push_region(start_row, end_row);
|
||||
|
||||
if results.len() > count {
|
||||
return vec![];
|
||||
}
|
||||
results
|
||||
}
|
||||
|
||||
|
@ -1133,7 +1133,7 @@ impl EditorElement {
|
||||
})
|
||||
};
|
||||
let background_ranges = editor
|
||||
.selected_rows::<crate::items::BufferSearchHighlights>(
|
||||
.background_highlight_row_ranges::<crate::items::BufferSearchHighlights>(
|
||||
start_anchor..end_anchor,
|
||||
&layout.position_map.snapshot,
|
||||
50000,
|
||||
|
Loading…
Reference in New Issue
Block a user