Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ public TextLeadingPrefixCharacterEllipsis(
var splitSuffix =
endShapedRun.Split(run.Length - suffixCount);

collapsedRuns.Add(splitSuffix.Second!);
// Second is null when the split position falls inside an
// unbreakable cluster that reaches the end of the run, so the
// run cannot be split. Keep the whole run as the suffix in
// that case instead of dereferencing a null reference.
collapsedRuns.Add(splitSuffix.Second ?? splitSuffix.First!);
}
}

Expand Down