Skip to content

Commit

Permalink
Ignore invalid file URIs from LSP (#6000)
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI authored Feb 16, 2023
1 parent c332b16 commit 9368ac7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,13 @@ impl Application {
}
}
Notification::PublishDiagnostics(mut params) => {
let path = params.uri.to_file_path().unwrap();
let path = match params.uri.to_file_path() {
Ok(path) => path,
Err(_) => {
log::error!("Unsupported file URI: {}", params.uri);
return;
}
};
let doc = self.editor.document_by_path_mut(&path);

if let Some(doc) = doc {
Expand Down

0 comments on commit 9368ac7

Please # to comment.