mirror of https://github.com/helix-editor/helix
Ignore invalid file URIs from LSP (#6000)
parent
c332b16855
commit
9368ac76b3
|
@ -703,7 +703,13 @@ impl Application {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Notification::PublishDiagnostics(mut params) => {
|
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);
|
let doc = self.editor.document_by_path_mut(&path);
|
||||||
|
|
||||||
if let Some(doc) = doc {
|
if let Some(doc) = doc {
|
||||||
|
|
Loading…
Reference in New Issue