Don't render invisibles with elements (#20841)

Turns out that in the case you have a somehow valid utf-8 file that
contains almost all ascii control characters, we run out of element
arena space.

Fixes: #20652

Release Notes:

- Fixed a crash when opening a file containing a very large number of
ascii control characters on one line.
This commit is contained in:
Conrad Irwin 2024-11-18 16:47:25 -07:00 committed by GitHub
parent f0c7e62adc
commit d4c5c0f05e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 119 additions and 65 deletions

View file

@ -29,7 +29,7 @@ pub struct LineLayout {
}
/// A run of text that has been shaped .
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct ShapedRun {
/// The font id for this run
pub font_id: FontId,