Skip to content

Commit

Permalink
fix: attempt to remove duplicate diags
Browse files Browse the repository at this point in the history
  • Loading branch information
Desdaemon committed Apr 11, 2024
1 parent 94b02f4 commit f5cd4a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,9 @@ impl Backend {
let range = lsp_range_to_offset_range(diag.range.clone(), &rope).unwrap_or_default();
!root.byte_range().contains(&range.start.0)
});
} else {
// There is no damage zone, assume everything has been reset.
diagnostics.clear();
}
let in_active_root =
|range: core::ops::Range<usize>| damage_zone.as_ref().map(|zone| zone.intersects(range)).unwrap_or(true);
Expand Down

0 comments on commit f5cd4a2

Please sign in to comment.