Skip to content

Commit

Permalink
Merge pull request godotengine#87790 from nongvantinh/fix-87643
Browse files Browse the repository at this point in the history
Fix incorrect condition for error filtering
  • Loading branch information
akien-mga committed Feb 2, 2024
2 parents 7f5079f + d81c9c3 commit 8a47d6e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ private bool ShouldDisplayDiagnostic(BuildDiagnostic diagnostic)
return false;

string searchText = _searchBox.Text;
if (!string.IsNullOrEmpty(searchText) &&
(!diagnostic.Message.Contains(searchText, StringComparison.OrdinalIgnoreCase) ||
!(diagnostic.File?.Contains(searchText, StringComparison.OrdinalIgnoreCase) ?? false)))
{
return false;
}

return true;
if (string.IsNullOrEmpty(searchText))
return true;
if (diagnostic.Message.Contains(searchText, StringComparison.OrdinalIgnoreCase))
return true;
if (diagnostic.File?.Contains(searchText, StringComparison.OrdinalIgnoreCase) ?? false)
return true;

return false;
}

private Color? GetProblemItemColor(BuildDiagnostic diagnostic)
Expand Down

0 comments on commit 8a47d6e

Please sign in to comment.