Update toss and remove more async

This commit is contained in:
Joscha 2023-04-17 20:36:04 +02:00
parent a638caadcb
commit ade7be594e
16 changed files with 109 additions and 116 deletions

View file

@ -12,7 +12,7 @@ use std::sync::Arc;
use async_trait::async_trait;
use parking_lot::FairMutex;
use toss::widgets::EditorState;
use toss::{AsyncWidget, Frame, Pos, Size, Terminal, WidthDb};
use toss::{AsyncWidget, Frame, Pos, Size, Terminal, WidgetExt, WidthDb};
use crate::store::{Msg, MsgStore};
use crate::ui::input::{key, InputEvent, KeyBindingsList};
@ -488,7 +488,7 @@ where
for (range, block) in renderer.into_visible_blocks() {
let widget = block.into_widget();
frame.push(Pos::new(0, range.top), widget.size());
widget.draw(frame).await.infallible();
widget.desync().draw(frame).await.infallible();
frame.pop();
}