Eagerly refresh diagnostics that do not intercept with user input
This commit is contained in:
parent
660c3371e4
commit
7145fabb6d
1 changed files with 6 additions and 0 deletions
|
@ -165,6 +165,12 @@ impl ProjectDiagnosticsEditor {
|
||||||
log::debug!("Adding path {path:?} to update for server {language_server_id}");
|
log::debug!("Adding path {path:?} to update for server {language_server_id}");
|
||||||
this.paths_to_update
|
this.paths_to_update
|
||||||
.insert((path.clone(), *language_server_id));
|
.insert((path.clone(), *language_server_id));
|
||||||
|
let no_multiselections = this.editor.update(cx, |editor, cx| {
|
||||||
|
editor.selections.all::<usize>(cx).len() <= 1
|
||||||
|
});
|
||||||
|
if no_multiselections && !this.is_dirty(cx) {
|
||||||
|
this.update_excerpts(Some(*language_server_id), cx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue