aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index a1685fcf..c8e8ecb1 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -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 {