Implement MultiBufferSnapshot::excerpt_headers_in_range
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
60e2c6bc52
commit
ad05c0cc7a
3 changed files with 110 additions and 12 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use collections::HashMap;
|
||||
use editor::{Editor, ExcerptProperties, MultiBuffer};
|
||||
use gpui::{
|
||||
|
@ -64,6 +66,13 @@ impl ProjectDiagnostics {
|
|||
buffer: &buffer,
|
||||
range: diagnostic.range,
|
||||
header_height: 1,
|
||||
render_header: Some(Arc::new({
|
||||
let message = diagnostic.diagnostic.message.clone();
|
||||
move |_| {
|
||||
Text::new(message.clone(), Default::default())
|
||||
.boxed()
|
||||
}
|
||||
})),
|
||||
},
|
||||
cx,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue