In the status bar, show the diagnostic under the cursor
This commit is contained in:
parent
941d935c4a
commit
8b5089c759
5 changed files with 95 additions and 3 deletions
|
@ -780,10 +780,14 @@ impl Buffer {
|
|||
Ok(Operation::UpdateDiagnostics(self.diagnostics.clone()))
|
||||
}
|
||||
|
||||
pub fn diagnostics_in_range<'a, T: 'a + ToOffset>(
|
||||
pub fn diagnostics_in_range<'a, T, O>(
|
||||
&'a self,
|
||||
range: Range<T>,
|
||||
) -> impl Iterator<Item = (Range<Point>, &Diagnostic)> + 'a {
|
||||
) -> impl Iterator<Item = (Range<O>, &Diagnostic)> + 'a
|
||||
where
|
||||
T: 'a + ToOffset,
|
||||
O: 'a + FromAnchor,
|
||||
{
|
||||
let content = self.content();
|
||||
self.diagnostics
|
||||
.intersecting_ranges(range, content, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue