From 23414d185c0e9303f24af448effbe4ea2ac1ee94 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 6 Jan 2024 18:56:55 +0100 Subject: [PATCH] Fix bug that was causing `Editor` to notify on every mouse move --- crates/editor/src/display_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs index 8703f1ba40aa06aa0d346606af6098896fab3dfe..4511ffe407849162b603c4b3a44d51e8d552c1c9 100644 --- a/crates/editor/src/display_map.rs +++ b/crates/editor/src/display_map.rs @@ -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 }