Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Ensure inlay hint toggling with modifiers happens fast (#25852)
Kirill Bulatov42571e405faa
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 811e1d5f0b1..42fb328b436 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -3691,6 +3691,7 @@ impl Editor {InlayHintRefreshReason::SettingsChange(_)| InlayHintRefreshReason::Toggle(_)| InlayHintRefreshReason::ExcerptsRemoved(_)+ | InlayHintRefreshReason::ModifiersChanged(_));let (invalidate_cache, required_languages) = match reason {InlayHintRefreshReason::ModifiersChanged(enabled) => {diff --git a/crates/editor/src/inlay_hint_cache.rs b/crates/editor/src/inlay_hint_cache.rsindex 83a806455f9..cc0511d3a9d 100644--- a/crates/editor/src/inlay_hint_cache.rs+++ b/crates/editor/src/inlay_hint_cache.rs@@ -581,6 +581,7 @@ impl InlayHintCache {self.version += 1;}self.update_tasks.clear();+ self.refresh_task = Task::ready(());self.hints.clear();}