1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-06-01 07:46:05 +02:00

Restore diagnostics.

This commit is contained in:
Blaž Hrastnik 2021-02-05 17:50:31 +09:00
parent a924ad2885
commit f2c2fa0cad

View File

@ -133,13 +133,12 @@ pub async fn handle_language_server_message(&mut self, call: Option<helix_lsp::C
Notification::PublishDiagnostics(params) => {
let path = Some(params.uri.to_file_path().unwrap());
let view: Option<&mut View> = None;
// TODO
// let view = self
// .editor
// .views
// .iter_mut()
// .find(|view| view.doc.path == path);
let view = self
.editor
.tree
.views()
.map(|(view, _key)| view)
.find(|view| view.doc.path == path);
if let Some(view) = view {
let doc = view.doc.text().slice(..);