mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 21:47:07 +04:00
Ignore invalid file URIs from LSP (#6000)
This commit is contained in:
parent
c332b16855
commit
9368ac76b3
@ -703,7 +703,13 @@ pub async fn handle_language_server_message(
|
||||
}
|
||||
}
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user