Properly dedup restarts of language servers
This commit is contained in:
parent
6d91fd078c
commit
ec57c1f4ac
3 changed files with 21 additions and 22 deletions
|
@ -4871,14 +4871,11 @@ impl Editor {
|
|||
}
|
||||
|
||||
fn restart_language_server(&mut self, _: &RestartLanguageServer, cx: &mut ViewContext<Self>) {
|
||||
let project = self.project.clone();
|
||||
if let Some(project) = project {
|
||||
if let Some(project) = self.project.clone() {
|
||||
self.buffer.update(cx, |multi_buffer, cx| {
|
||||
for buffer in multi_buffer.all_buffers() {
|
||||
project.update(cx, |project, cx| {
|
||||
project.restart_language_server_for_buffer(&buffer, cx);
|
||||
});
|
||||
}
|
||||
project.update(cx, |project, cx| {
|
||||
project.restart_language_servers_for_buffers(multi_buffer.all_buffers(), cx);
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue