mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 01:34:16 +03:00
Extend empty diagnostic ranges by one character
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
6212ebad9b
commit
b571eae4f3
@ -710,8 +710,12 @@ impl Buffer {
|
||||
end = last_edit_new_end + (end - last_edit_old_end);
|
||||
}
|
||||
|
||||
let range = content.clip_point_utf16(start, Bias::Left)
|
||||
let mut range = content.clip_point_utf16(start, Bias::Left)
|
||||
..content.clip_point_utf16(end, Bias::Right);
|
||||
if range.start == range.end {
|
||||
range.end.column += 1;
|
||||
range.end = content.clip_point_utf16(range.end, Bias::Right);
|
||||
}
|
||||
Some((range, (severity, diagnostic.message)))
|
||||
}),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user