Clamp for all UTF-16 to offset conversions which used to use ToOffset
This commit is contained in:
parent
f9cbed5a1f
commit
bb32599ded
4 changed files with 43 additions and 39 deletions
|
@ -70,8 +70,8 @@ impl DiagnosticSet {
|
|||
Self {
|
||||
diagnostics: SumTree::from_iter(
|
||||
entries.into_iter().map(|entry| DiagnosticEntry {
|
||||
range: buffer.anchor_before(entry.range.start)
|
||||
..buffer.anchor_after(entry.range.end),
|
||||
range: buffer.clamped_anchor_before(entry.range.start)
|
||||
..buffer.clamped_anchor_after(entry.range.end),
|
||||
diagnostic: entry.diagnostic,
|
||||
}),
|
||||
buffer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue