mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Fix panic! caused by bad utf16 clipping (#7530)
Release Notes: - Fixed a panic in diagnostics with emojis **or** - N/A
This commit is contained in:
parent
374c8a4c8c
commit
f55aba51ec
@ -3987,7 +3987,7 @@ impl Project {
|
||||
range.end = snapshot.clip_point_utf16(Unclipped(range.end), Bias::Right);
|
||||
if range.start == range.end && range.end.column > 0 {
|
||||
range.start.column -= 1;
|
||||
range.end = snapshot.clip_point_utf16(Unclipped(range.end), Bias::Left);
|
||||
range.start = snapshot.clip_point_utf16(Unclipped(range.start), Bias::Left);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user