Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Re-register buffers on server stop (#40504)
Kirill Bulatov22fd91d4909e
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 66e5b4df9d0..cc027409007 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -1883,8 +1883,14 @@ impl Editor {project::Event::RefreshInlayHints => {editor.refresh_inlay_hints(InlayHintRefreshReason::RefreshRequested, cx);}- project::Event::LanguageServerAdded(..)- | project::Event::LanguageServerRemoved(..) => {+ project::Event::LanguageServerRemoved(..) => {+ if editor.tasks_update_task.is_none() {+ editor.tasks_update_task = Some(editor.refresh_runnables(window, cx));+ }+ editor.registered_buffers.clear();+ editor.register_visible_buffers(cx);+ }+ project::Event::LanguageServerAdded(..) => {if editor.tasks_update_task.is_none() {editor.tasks_update_task = Some(editor.refresh_runnables(window, cx));}@@ -22102,8 +22108,7 @@ impl Editor {}fn register_visible_buffers(&mut self, cx: &mut Context<Self>) {- // Singletons are registered on editor creation.- if self.ignore_lsp_data() || self.buffer().read(cx).is_singleton() {+ if self.ignore_lsp_data() {return;}for (_, (visible_buffer, _, _)) in self.visible_excerpts(None, cx) {