Skip to content

Commit

Permalink
Account for whether warnings are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz committed Feb 21, 2025
1 parent f33c16b commit b8966d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/diagnostics/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ const DIAGNOSTICS_UPDATE_DEBOUNCE: Duration = Duration::from_millis(50);

impl Render for ProjectDiagnosticsEditor {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let child = if self.summary.warning_count + self.summary.error_count > 0 {
let warning_count = if self.include_warnings {
self.summary.warning_count
} else {
0
};

let child = if warning_count + self.summary.error_count == 0 {
div()
.key_context("EmptyPane")
.bg(cx.theme().colors().editor_background)
Expand Down

0 comments on commit b8966d8

Please sign in to comment.