Extract borrow of FontSystem from Buffer

This commit is contained in:
Edgar Geier 2023-03-12 10:30:03 +01:00
parent bff5aaaea3
commit 057b5b6fa9
No known key found for this signature in database
GPG key ID: DE2B55319457EB56
12 changed files with 381 additions and 216 deletions

View file

@ -67,6 +67,8 @@ fn main() {
#[cfg(feature = "vi")]
let mut editor = cosmic_text::ViEditor::new(editor);
let mut editor = editor.borrow_with(&font_system);
editor
.buffer_mut()
.set_size(window.width() as f32 - line_x * 2.0, window.height() as f32);