Avoid panics in LSP store path handling (#42117)
Release Notes: - Fixed incorrect journal paths handling
This commit is contained in:
@@ -7654,14 +7654,13 @@ impl LspStore {
|
||||
let uri = lsp::Uri::from_file_path(&abs_path)
|
||||
.ok()
|
||||
.with_context(|| format!("Failed to convert path to URI: {}", abs_path.display()))
|
||||
.unwrap();
|
||||
.log_err()?;
|
||||
let next_snapshot = buffer.text_snapshot();
|
||||
for language_server in language_servers {
|
||||
let language_server = language_server.clone();
|
||||
|
||||
let buffer_snapshots = self
|
||||
.as_local_mut()
|
||||
.unwrap()
|
||||
.as_local_mut()?
|
||||
.buffer_snapshots
|
||||
.get_mut(&buffer.remote_id())
|
||||
.and_then(|m| m.get_mut(&language_server.server_id()))?;
|
||||
|
||||
Reference in New Issue
Block a user