From f2c2fa0cad2a0d15e349765d28e488f9acf88b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Fri, 5 Feb 2021 17:50:31 +0900 Subject: [PATCH] Restore diagnostics. --- helix-term/src/application.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 6e0005345..d307456e0 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -133,13 +133,12 @@ impl Application { 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(..);