Ensure pull diagnostics do not happen for non-full mode editors (#32449)
Follow-up of https://github.com/zed-industries/zed/pull/19230 Release Notes: - N/A
This commit is contained in:
parent
eb5f59577d
commit
c1a4a24bce
1 changed files with 4 additions and 1 deletions
|
@ -16077,13 +16077,16 @@ impl Editor {
|
|||
window: &Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<()> {
|
||||
let project = self.project.as_ref()?.downgrade();
|
||||
if !self.mode().is_full() {
|
||||
return None;
|
||||
}
|
||||
let pull_diagnostics_settings = ProjectSettings::get_global(cx)
|
||||
.diagnostics
|
||||
.lsp_pull_diagnostics;
|
||||
if !pull_diagnostics_settings.enabled {
|
||||
return None;
|
||||
}
|
||||
let project = self.project.as_ref()?.downgrade();
|
||||
let debounce = Duration::from_millis(pull_diagnostics_settings.debounce_ms);
|
||||
let mut buffers = self.buffer.read(cx).all_buffers();
|
||||
if let Some(buffer_id) = buffer_id {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue