Show scrollbar even when buffer search highlights are outside viewport

This commit is contained in:
Antonio Scandurra
2024-01-04 12:39:15 +01:00
parent 1d98132eed
commit f0afa3f9e3
2 changed files with 9 additions and 2 deletions
+6
View File
@@ -8448,6 +8448,12 @@ impl Editor {
})
}
pub fn has_background_highlights<T: 'static>(&self) -> bool {
self.background_highlights
.get(&TypeId::of::<T>())
.map_or(false, |(_, highlights)| !highlights.is_empty())
}
pub fn background_highlights_in_range(
&self,
search_range: Range<Anchor>,