Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix crash when jumping to a definition in the same buffer
Max Brunsfeld27a6761afc8d
diff --git a/crates/project2/src/lsp_command.rs b/crates/project2/src/lsp_command.rsindex 94c277db1e0..a2de52b21ae 100644--- a/crates/project2/src/lsp_command.rs+++ b/crates/project2/src/lsp_command.rs@@ -717,8 +717,9 @@ async fn location_links_from_lsp(})?.await?;- buffer.update(&mut cx, |origin_buffer, cx| {+ cx.update(|cx| {let origin_location = origin_range.map(|origin_range| {+ let origin_buffer = buffer.read(cx);let origin_start =origin_buffer.clip_point_utf16(point_from_lsp(origin_range.start), Bias::Left);let origin_end =