mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
Fix crash when jumping to a definition in the same buffer
This commit is contained in:
parent
0b8f9067ff
commit
27a6761afc
1 changed files with 2 additions and 1 deletions
|
@ -717,8 +717,9 @@ async fn location_links_from_lsp(
|
||||||
})?
|
})?
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
buffer.update(&mut cx, |origin_buffer, cx| {
|
cx.update(|cx| {
|
||||||
let origin_location = origin_range.map(|origin_range| {
|
let origin_location = origin_range.map(|origin_range| {
|
||||||
|
let origin_buffer = buffer.read(cx);
|
||||||
let origin_start =
|
let origin_start =
|
||||||
origin_buffer.clip_point_utf16(point_from_lsp(origin_range.start), Bias::Left);
|
origin_buffer.clip_point_utf16(point_from_lsp(origin_range.start), Bias::Left);
|
||||||
let origin_end =
|
let origin_end =
|
||||||
|
|
Loading…
Reference in a new issue