Hide hover when font changes, and handle case where delay was preventing hover with large symbol range
This commit is contained in:
parent
b51bd87c10
commit
1da1853a76
4 changed files with 43 additions and 17 deletions
|
@ -121,10 +121,18 @@ impl WrapMap {
|
|||
(self.snapshot.clone(), mem::take(&mut self.edits_since_sync))
|
||||
}
|
||||
|
||||
pub fn set_font(&mut self, font_id: FontId, font_size: f32, cx: &mut ModelContext<Self>) {
|
||||
pub fn set_font(
|
||||
&mut self,
|
||||
font_id: FontId,
|
||||
font_size: f32,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) -> bool {
|
||||
if (font_id, font_size) != self.font {
|
||||
self.font = (font_id, font_size);
|
||||
self.rewrap(cx)
|
||||
self.rewrap(cx);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue