Skip to content

Commit

Permalink
Fix text selection crashes
Browse files Browse the repository at this point in the history
Closes #3881
  • Loading branch information
emilk committed Jan 24, 2024
1 parent 41aad74 commit 5e7fa46
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/epaint/src/text/text_layout_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,9 @@ impl Galley {

pub fn end_rcursor(&self) -> RCursor {
if let Some(last_row) = self.rows.last() {
crate::epaint_assert!(!last_row.ends_with_newline);
RCursor {
row: self.rows.len() - 1,
column: last_row.char_count_excluding_newline(),
column: last_row.char_count_including_newline(),
}
} else {
Default::default()
Expand Down

0 comments on commit 5e7fa46

Please sign in to comment.