Fix editor::SplitSelectionIntoLines adding an extra line at the end (#25053)

Closes #4795

Release Notes:

- Fixed `editor::SplitSelectionIntoLines` adding an extra line at end
of selection
This commit is contained in:
João Marcos 2025-02-18 00:23:48 -03:00 committed by GitHub
parent 12aa270b9a
commit a8de6af641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 100 additions and 26 deletions

View file

@ -975,7 +975,10 @@ pub struct TextSummary {
pub chars: usize,
/// Length in UTF-16 code units
pub len_utf16: OffsetUtf16,
/// A point representing the number of lines and the length of the last line
/// A point representing the number of lines and the length of the last line.
///
/// In other words, it marks the point after the last byte in the text, (if
/// EOF was a character, this would be its position).
pub lines: Point,
/// How many `char`s are in the first line
pub first_line_chars: u32,