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:
Kirill Bulatov 2025-06-10 15:05:45 +03:00 committed by GitHub
parent eb5f59577d
commit c1a4a24bce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {