Use a proper snapshot version when resolving for utf16 points (#32815)
Release Notes: - Fixed a panic when merging pull and (newer) push diagnostics Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
69e84c0c48
commit
6d96f8be8e
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue