Buffer::set_rich_text: Only add attrs if they don't match the defaults

This commit is contained in:
Jeremy Soller 2023-11-02 10:24:21 -06:00
parent 6196d72266
commit 241c4ca357
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
2 changed files with 6 additions and 3 deletions

View file

@ -188,7 +188,7 @@ impl<'a> Edit for SyntaxEditor<'a> {
match buffer.line_layout(font_system, line_i) {
Some(layout_lines) => {
total_layout += layout_lines.len() as i32;
},
}
None => {
//TODO: should this be possible?
}
@ -251,7 +251,7 @@ impl<'a> Edit for SyntaxEditor<'a> {
match buffer.line_layout(font_system, line_i) {
Some(layout_lines) => {
total_layout += layout_lines.len() as i32;
},
}
None => {
//TODO: should this be possible?
}