Enhance keyboard navigation when showing next diagnostic

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-18 16:55:18 +01:00
parent 643545e91e
commit 5094380c83
4 changed files with 99 additions and 28 deletions

View file

@ -816,7 +816,7 @@ impl Buffer {
pub fn diagnostics_in_range<'a, T, O>(
&'a self,
range: Range<T>,
search_range: Range<T>,
) -> impl Iterator<Item = (Range<O>, &Diagnostic)> + 'a
where
T: 'a + ToOffset,
@ -824,7 +824,7 @@ impl Buffer {
{
let content = self.content();
self.diagnostics
.intersecting_ranges(range, content, true)
.intersecting_ranges(search_range, content, true)
.map(move |(_, range, diagnostic)| (range, diagnostic))
}