History

Fix crash when jumping to a definition in the same buffer

Max Brunsfeld committed 2 years ago

Commit 27a67611 parent 0b8f9061 file · +2 −1Browse files

Unified · Split

crates/project2/src/lsp_command.rs+2−1
@@ -717,8 +717,9 @@ async fn location_links_from_lsp( · 716 unmodified lines
717717 })?
718718 .await?;
719719
720− buffer.update(&mut cx, |origin_buffer, cx| {
720+ cx.update(|cx| {
721721 let origin_location = origin_range.map(|origin_range| {
722+ let origin_buffer = buffer.read(cx);
722723 let origin_start =
723724 origin_buffer.clip_point_utf16(point_from_lsp(origin_range.start), Bias::Left);
724725 let origin_end =

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t