Ensure inlay hint toggling with modifiers happens fast (#25852)
Follow-up of https://github.com/zed-industries/zed/pull/25766 Fixes the bugs found: * modifier toggle not happening instantly due to `edit_debounce_ms` considered * hint update race that ignored the cache clear Release Notes: - N/A
This commit is contained in:
parent
2d61a51ded
commit
42571e405f
@ -3691,6 +3691,7 @@ impl Editor {
|
||||
InlayHintRefreshReason::SettingsChange(_)
|
||||
| InlayHintRefreshReason::Toggle(_)
|
||||
| InlayHintRefreshReason::ExcerptsRemoved(_)
|
||||
| InlayHintRefreshReason::ModifiersChanged(_)
|
||||
);
|
||||
let (invalidate_cache, required_languages) = match reason {
|
||||
InlayHintRefreshReason::ModifiersChanged(enabled) => {
|
||||
|
@ -581,6 +581,7 @@ impl InlayHintCache {
|
||||
self.version += 1;
|
||||
}
|
||||
self.update_tasks.clear();
|
||||
self.refresh_task = Task::ready(());
|
||||
self.hints.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user