This commit is contained in:
Antonio Scandurra 2023-10-23 11:43:05 +02:00
parent da8919002f
commit 0de4a93ec7
17 changed files with 22689 additions and 11 deletions

View file

@ -832,7 +832,8 @@ impl Buffer {
if parse_again {
this.reparse(cx);
}
});
})
.ok();
})
.detach();
}
@ -876,7 +877,8 @@ impl Buffer {
let indent_sizes = indent_sizes.await;
this.update(&mut cx, |this, cx| {
this.apply_autoindents(indent_sizes, cx);
});
})
.ok();
}));
}
}

View file

@ -234,6 +234,7 @@ impl SyntaxMap {
self.snapshot.interpolate(text);
}
#[allow(dead_code)] // todo!()
#[cfg(test)]
pub fn reparse(&mut self, language: Arc<Language>, text: &BufferSnapshot) {
self.snapshot
@ -785,6 +786,7 @@ impl SyntaxSnapshot {
)
}
#[allow(dead_code)] // todo!()
#[cfg(test)]
pub fn layers<'a>(&'a self, buffer: &'a BufferSnapshot) -> Vec<SyntaxLayerInfo> {
self.layers_for_range(0..buffer.len(), buffer).collect()