mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
Don't insert blocks within multi-byte characters in randomized test
This commit is contained in:
parent
572e571927
commit
b80887dabe
1 changed files with 3 additions and 1 deletions
|
@ -1146,7 +1146,9 @@ mod tests {
|
|||
let block_properties = (0..block_count)
|
||||
.map(|_| {
|
||||
let buffer = buffer.read(cx);
|
||||
let position = buffer.anchor_before(rng.gen_range(0..=buffer.len()));
|
||||
let position = buffer.anchor_before(
|
||||
buffer.clip_offset(rng.gen_range(0..=buffer.len()), Bias::Left),
|
||||
);
|
||||
|
||||
let len = rng.gen_range(0..10);
|
||||
let mut text = Rope::from(
|
||||
|
|
Loading…
Reference in a new issue