Skip to content

Commit

Permalink
fix: incorrect secondary file in LSP errors (#7347)
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite authored Feb 11, 2025
1 parent 668a476 commit 5d782f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tooling/lsp/src/notifications/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ fn secondary_to_related_information(
let secondary_file = secondary.file.unwrap_or(file_id);
let path = fm.path(secondary_file)?;
let uri = Url::from_file_path(path).ok()?;
let range = byte_span_to_range(files, file_id, secondary.span.into())?;
let range = byte_span_to_range(files, secondary_file, secondary.span.into())?;
let message = secondary.message;
Some(DiagnosticRelatedInformation { location: lsp_types::Location { uri, range }, message })
}
Expand Down

0 comments on commit 5d782f0

Please sign in to comment.