mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
8ef6b1d8a9
This is related to #849: in that pull request we avoided *storing* empty diagnostics, but we'd still report an event when receiving consecutive empty diagnostics. So if the project diagnostics editor was open, it could happen that opening a buffer would cause the language server to report zero diagnostics. We would therefore close the buffer because there were no diagnostics, but doing so would cause the LSP to report another event with zero diagnostics. This would repeat forever, causing Zed to use a lot of CPU and the UI not to refresh properly. With this commit we will simply avoid emitting a `DiagnosticsUpdated` event altogether if no diagnostics were present before *and* the LSP is reporting a `PublishDiagnostics` event with no diagnostics in it. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |