Fix bug that was causing Editor to notify on every mouse move (#3929)

Release Notes:

- Fixed a bug that was causing Zed to use a lot of energy when moving
the mouse.
This commit is contained in:
Antonio Scandurra
2024-01-06 19:13:50 +01:00
committed by GitHub
+1 -1
View File
@@ -240,7 +240,7 @@ impl DisplayMap {
}
pub fn clear_highlights(&mut self, type_id: TypeId) -> bool {
let mut cleared = self.text_highlights.remove(&Some(type_id)).is_some();
cleared |= self.inlay_highlights.remove(&type_id).is_none();
cleared |= self.inlay_highlights.remove(&type_id).is_some();
cleared
}