Hide hover when font changes, and handle case where delay was preventing hover with large symbol range

This commit is contained in:
Keith Simmons 2022-06-08 11:54:24 -07:00
parent b51bd87c10
commit 1da1853a76
4 changed files with 43 additions and 17 deletions

View file

@ -193,9 +193,9 @@ impl DisplayMap {
self.text_highlights.remove(&Some(type_id))
}
pub fn set_font(&self, font_id: FontId, font_size: f32, cx: &mut ModelContext<Self>) {
pub fn set_font(&self, font_id: FontId, font_size: f32, cx: &mut ModelContext<Self>) -> bool {
self.wrap_map
.update(cx, |map, cx| map.set_font(font_id, font_size, cx));
.update(cx, |map, cx| map.set_font(font_id, font_size, cx))
}
pub fn set_wrap_width(&self, width: Option<f32>, cx: &mut ModelContext<Self>) -> bool {