Use mutex for TextBuffer state

This commit is contained in:
Jeremy Soller 2022-10-18 13:12:25 -06:00
parent a599d83ca0
commit a21225c9a0
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
3 changed files with 17 additions and 18 deletions

View file

@ -97,11 +97,12 @@ fn main() {
let mut mouse_left = false;
let mut rehit = false;
loop {
//TODO: do not use this
buffer.shape_until_scroll();
let font_size = buffer.font_size();
let line_height = buffer.line_height();
buffer.shape_until_scroll();
if rehit {
let instant = Instant::now();