diff --git a/crates/text/src/text.rs b/crates/text/src/text.rs index 87ce4d49c14732c2a89d226e34026c7a8c37db6b..5c78f9aea606d2f3eb828643e660a1b41d65e755 100644 --- a/crates/text/src/text.rs +++ b/crates/text/src/text.rs @@ -2417,7 +2417,7 @@ impl BufferSnapshot { { Anchor::max_for_buffer(self.remote_id) } else { - if self + if !self .visible_text .assert_char_boundary::<{ cfg!(debug_assertions) }>(offset) { @@ -3125,7 +3125,7 @@ impl ToOffset for Point { impl ToOffset for usize { #[track_caller] fn to_offset(&self, snapshot: &BufferSnapshot) -> usize { - if snapshot + if !snapshot .as_rope() .assert_char_boundary::<{ cfg!(debug_assertions) }>(*self) {