mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Fix panic in request_multiple_lsp_locally (#22806)
Release Notes: - Fix a panic after disconnecting from a remote project
This commit is contained in:
parent
222b04548d
commit
0b361e5b7c
1 changed files with 4 additions and 4 deletions
|
@ -5592,13 +5592,13 @@ impl LspStore {
|
|||
<R::LspRequest as lsp::request::Request>::Result: Send,
|
||||
<R::LspRequest as lsp::request::Request>::Params: Send,
|
||||
{
|
||||
debug_assert!(self.upstream_client().is_none());
|
||||
let Some(local) = self.as_local() else {
|
||||
return Task::ready(Vec::new());
|
||||
};
|
||||
|
||||
let snapshot = buffer.read(cx).snapshot();
|
||||
let scope = position.and_then(|position| snapshot.language_scope_at(position));
|
||||
let server_ids = self
|
||||
.as_local()
|
||||
.unwrap()
|
||||
let server_ids = local
|
||||
.language_servers_for_buffer(buffer.read(cx), cx)
|
||||
.filter(|(adapter, _)| {
|
||||
scope
|
||||
|
|
Loading…
Reference in a new issue