Refresh diagnostics inside the tab
This commit is contained in:
@@ -151,6 +151,7 @@ impl ProjectDiagnosticsEditor {
|
||||
) -> Self {
|
||||
cx.subscribe(&project_handle, |this, _, event, cx| match event {
|
||||
project::Event::DiskBasedDiagnosticsFinished { language_server_id } => {
|
||||
log::debug!("Disk based diagnostics finished for server {language_server_id}");
|
||||
this.update_excerpts(Some(*language_server_id), cx);
|
||||
this.update_title(cx);
|
||||
}
|
||||
@@ -158,8 +159,11 @@ impl ProjectDiagnosticsEditor {
|
||||
language_server_id,
|
||||
path,
|
||||
} => {
|
||||
log::debug!("Adding path {path:?} to update for server {language_server_id}");
|
||||
this.paths_to_update
|
||||
.insert((path.clone(), *language_server_id));
|
||||
this.update_excerpts(Some(*language_server_id), cx);
|
||||
this.update_title(cx);
|
||||
}
|
||||
_ => {}
|
||||
})
|
||||
@@ -229,6 +233,7 @@ impl ProjectDiagnosticsEditor {
|
||||
language_server_id: Option<LanguageServerId>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
log::debug!("Updating excerpts for server {language_server_id:?}");
|
||||
let mut paths = Vec::new();
|
||||
self.paths_to_update.retain(|(path, server_id)| {
|
||||
if language_server_id
|
||||
|
||||
Reference in New Issue
Block a user