diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs index 5be61d1efe..43def73ae2 100644 --- a/crates/multi_buffer/src/multi_buffer.rs +++ b/crates/multi_buffer/src/multi_buffer.rs @@ -3828,21 +3828,10 @@ impl MultiBufferSnapshot { { let main_buffer_position = cursor.main_buffer_position()?; let buffer_snapshot = &cursor.excerpt()?.buffer; - // remove this assert once we figure out the cause of the panics for #40453 - buffer_snapshot - .text - .as_rope() - .assert_char_boundary(main_buffer_position); return Some((buffer_snapshot, main_buffer_position)); } else if buffer_offset > region.buffer.len() { return None; } - // remove this assert once we figure out the cause of the panics for #40453 - region - .buffer - .text - .as_rope() - .assert_char_boundary(buffer_offset); Some((region.buffer, buffer_offset)) } diff --git a/crates/text/src/text.rs b/crates/text/src/text.rs index d9a6b2bb26..316bdb59fa 100644 --- a/crates/text/src/text.rs +++ b/crates/text/src/text.rs @@ -2447,7 +2447,6 @@ impl BufferSnapshot { if offset > self.visible_text.len() { panic!("offset {} is out of bounds", offset) } - self.visible_text.assert_char_boundary(offset); let (start, _, item) = self.fragments.find::(&None, &offset, bias); let fragment = item.unwrap(); let overshoot = offset - start;