Skip to content

Commit 5e7fa46

Browse files
committed
Fix text selection crashes
Closes #3881
1 parent 41aad74 commit 5e7fa46

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/epaint/src/text/text_layout_types.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,9 @@ impl Galley {
834834

835835
pub fn end_rcursor(&self) -> RCursor {
836836
if let Some(last_row) = self.rows.last() {
837-
crate::epaint_assert!(!last_row.ends_with_newline);
838837
RCursor {
839838
row: self.rows.len() - 1,
840-
column: last_row.char_count_excluding_newline(),
839+
column: last_row.char_count_including_newline(),
841840
}
842841
} else {
843842
Default::default()

0 commit comments

Comments
 (0)