Skip to content

Commit

Permalink
LSP: Canonicalize diagnostic file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Jun 17, 2023
1 parent 7bbd2d0 commit d0e6a0e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,15 @@ impl Application {
return;
}
};
let path = match path.canonicalize() {
Ok(path) => path,
Err(err) => {
log::error!(
"Could not canonicalize diagnostic path {path:?}: {err}"
);
return;
}
};
let offset_encoding = language_server!().offset_encoding();
let doc = self.editor.document_by_path_mut(&path).filter(|doc| {
if let Some(version) = params.version {
Expand Down

0 comments on commit d0e6a0e

Please sign in to comment.