Extend empty diagnostic ranges at the ends of lines

This commit is contained in:
Max Brunsfeld 2021-11-03 13:49:39 -07:00
parent 9384823e47
commit baf636a4a4
2 changed files with 78 additions and 15 deletions

View file

@ -751,6 +751,10 @@ impl Buffer {
if range.start == range.end {
range.end.column += 1;
range.end = content.clip_point_utf16(range.end, Bias::Right);
if range.start == range.end && range.end.column > 0 {
range.start.column -= 1;
range.start = content.clip_point_utf16(range.start, Bias::Left);
}
}
Some((
range,