Fix syntax map bug with combined injections inside of other injections
This commit is contained in:
parent
ac1882b99b
commit
01bd5c30fc
2 changed files with 37 additions and 0 deletions
|
@ -541,6 +541,15 @@ impl SyntaxSnapshot {
|
|||
.to_ts_point();
|
||||
}
|
||||
|
||||
if included_ranges.is_empty() {
|
||||
included_ranges.push(tree_sitter::Range {
|
||||
start_byte: 0,
|
||||
end_byte: 0,
|
||||
start_point: Default::default(),
|
||||
end_point: Default::default(),
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(SyntaxLayerContent::Parsed { tree: old_tree, .. }) =
|
||||
old_layer.map(|layer| &layer.content)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue