Skip over unnecessary code diagnostics when hitting f8

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-15 15:55:39 +01:00
parent 7155dabf5b
commit c6c72a7249

View file

@ -4211,6 +4211,7 @@ impl Editor {
};
let group = diagnostics.find_map(|entry| {
if entry.diagnostic.is_primary
&& !entry.diagnostic.is_unnecessary
&& !entry.range.is_empty()
&& Some(entry.range.end) != active_primary_range.as_ref().map(|r| *r.end())
{