Emit an UpdateDiagnostics
from Worktree when buffer diagnostics change
This commit is contained in:
parent
c47340000d
commit
9164c5f239
3 changed files with 34 additions and 11 deletions
|
@ -725,6 +725,10 @@ impl Buffer {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn all_diagnostics<'a>(&'a self) -> impl 'a + Iterator<Item = &'a DiagnosticEntry<Anchor>> {
|
||||
self.diagnostics.iter()
|
||||
}
|
||||
|
||||
pub fn update_diagnostics(
|
||||
&mut self,
|
||||
version: Option<i32>,
|
||||
|
@ -1859,15 +1863,6 @@ impl BufferSnapshot {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn all_diagnostics<'a, O>(&'a self) -> impl 'a + Iterator<Item = DiagnosticEntry<O>>
|
||||
where
|
||||
O: 'a + FromAnchor,
|
||||
{
|
||||
self.diagnostics
|
||||
.iter()
|
||||
.map(|diagnostic| diagnostic.resolve(self))
|
||||
}
|
||||
|
||||
pub fn diagnostics_in_range<'a, T, O>(
|
||||
&'a self,
|
||||
search_range: Range<T>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue