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