Support highlighting in blocks

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-18 14:08:21 +01:00
parent 0f1eb3dd2e
commit 0a6293bcda
10 changed files with 105 additions and 87 deletions

View file

@ -906,7 +906,7 @@ fn chunks_with_diagnostics<T: ToOffset + ToPoint>(
range: Range<T>,
) -> Vec<(String, Option<DiagnosticSeverity>)> {
let mut chunks: Vec<(String, Option<DiagnosticSeverity>)> = Vec::new();
for chunk in buffer.snapshot().chunks(range, true) {
for chunk in buffer.snapshot().chunks(range, Some(&Default::default())) {
if chunks
.last()
.map_or(false, |prev_chunk| prev_chunk.1 == chunk.diagnostic)