Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use a proper snapshot version when resolving for utf16 points (#32815)

Kirill Bulatov6d96f8be8e59
diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs
index d5832578590..46c81858146 100644
--- a/crates/project/src/lsp_store.rs
+++ b/crates/project/src/lsp_store.rs
@@ -6680,11 +6680,7 @@ impl LspStore {
};
if let Some(buffer_handle) = self.buffer_store.read(cx).get_by_path(&project_path, cx) {
- let snapshot = self
- .as_local_mut()
- .unwrap()
- .buffer_snapshot_for_lsp_version(&buffer_handle, server_id, version, cx)?;
-
+ let snapshot = buffer_handle.read(cx).snapshot();
let buffer = buffer_handle.read(cx);
let reused_diagnostics = buffer
.get_diagnostics(server_id)