diff options
author | Jonathan LEI | 2023-02-16 05:17:18 +0000 |
---|---|---|
committer | GitHub | 2023-02-16 05:17:18 +0000 |
commit | 9368ac76b36f430cd127658d9e66b169053c9626 (patch) | |
tree | e5f4543c1fb9ebb44aa0e37a5f649e2bd1a63c19 /helix-term/src | |
parent | c332b16855c72beaf0297ad1d5768ed83a768792 (diff) |
Ignore invalid file URIs from LSP (#6000)
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/application.rs | 8 |
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 { |