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)
|
let block_properties = (0..block_count)
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
let buffer = buffer.read(cx);
|
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 len = rng.gen_range(0..10);
|
||||||
let mut text = Rope::from(
|
let mut text = Rope::from(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue