Add is_tab field to chunks

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-04-18 10:56:43 -07:00 committed by Kirill Bulatov
parent cf304a0edc
commit 4f8607039c
5 changed files with 57 additions and 11 deletions

View file

@ -311,6 +311,7 @@ pub struct Chunk<'a> {
pub highlight_style: Option<HighlightStyle>,
pub diagnostic_severity: Option<DiagnosticSeverity>,
pub is_unnecessary: bool,
pub is_tab: bool,
}
pub struct Diff {
@ -2840,9 +2841,9 @@ impl<'a> Iterator for BufferChunks<'a> {
Some(Chunk {
text: slice,
syntax_highlight_id: highlight_id,
highlight_style: None,
diagnostic_severity: self.current_diagnostic_severity(),
is_unnecessary: self.current_code_is_unnecessary(),
..Default::default()
})
} else {
None