editor: Don't pull diagnostics on excerpts change in diagnostics editors (#38212)

This can lead to an infinite regress when using a language server that
supports pull diagnostics, since the excerpts for the diagnostics editor
are set based on the project's diagnostics.

Closes #36772

Release Notes:

- Fixed a bug that could cause duplicated diagnostics with some language
servers.
This commit is contained in:
Cole Miller
2025-09-16 21:58:24 -04:00
committed by GitHub
parent f6c5c68751
commit c27d8e0c7a
+3 -1
View File
@@ -20549,7 +20549,9 @@ impl Editor {
)
.detach();
}
self.update_lsp_data(false, Some(buffer_id), window, cx);
if self.active_diagnostics != ActiveDiagnostic::All {
self.update_lsp_data(false, Some(buffer_id), window, cx);
}
cx.emit(EditorEvent::ExcerptsAdded {
buffer: buffer.clone(),
predecessor: *predecessor,