multi_buffer: Remove redundant buffer id field (#43459)
It is easy for us to get the two fields out of sync causing weird problems, there is no reason to have both here so. Release Notes: - N/A *or* Added/Fixed/Improved ... Co-authored by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
@@ -330,7 +330,7 @@ impl SyntaxSnapshot {
|
||||
let slice = cursor.slice(
|
||||
&SyntaxLayerPosition {
|
||||
depth: depth + 1,
|
||||
range: Anchor::MIN..Anchor::MAX,
|
||||
range: Anchor::min_max_range_for_buffer(text.remote_id()),
|
||||
language: None,
|
||||
},
|
||||
Bias::Left,
|
||||
@@ -493,7 +493,7 @@ impl SyntaxSnapshot {
|
||||
start_point: Point::zero().to_ts_point(),
|
||||
end_point: text.max_point().to_ts_point(),
|
||||
}],
|
||||
range: Anchor::MIN..Anchor::MAX,
|
||||
range: Anchor::min_max_range_for_buffer(text.remote_id()),
|
||||
mode: ParseMode::Single,
|
||||
});
|
||||
|
||||
@@ -515,7 +515,7 @@ impl SyntaxSnapshot {
|
||||
} else {
|
||||
SyntaxLayerPosition {
|
||||
depth: max_depth + 1,
|
||||
range: Anchor::MAX..Anchor::MAX,
|
||||
range: Anchor::min_max_range_for_buffer(text.remote_id()),
|
||||
language: None,
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user