Fix re-parsing when buffer's language has changed

This commit is contained in:
Max Brunsfeld 2022-08-24 15:29:25 -07:00
parent 015b6c4a31
commit 61b70b7e2d

View file

@ -306,10 +306,6 @@ impl SyntaxSnapshot {
language: Arc<Language>,
) {
let edits = text.edits_since::<usize>(from_version).collect::<Vec<_>>();
if edits.is_empty() {
return;
}
let max_depth = self.layers.summary().max_depth;
let mut cursor = self.layers.cursor::<SyntaxLayerSummary>();
cursor.next(&text);