Avoid panics in LSP store path handling (#42117)

Release Notes:

- Fixed incorrect journal paths handling
This commit is contained in:
Lay Sheth
2025-11-11 20:51:57 +02:00
committed by GitHub
parent 908ef03502
commit e01e0b83c4
3 changed files with 74 additions and 7 deletions
+2 -3
View File
@@ -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()))?;