Fetch scrollback history independently of main loop (#39)

This commit is contained in:
Ulyssa 2023-03-13 10:46:26 -07:00
parent 6a0722795a
commit 61897ea6f2
No known key found for this signature in database
GPG key ID: 1B3965A3D18B9B64
4 changed files with 149 additions and 137 deletions

View file

@ -101,14 +101,6 @@ use modalkit::{
},
};
const MIN_MSG_LOAD: u32 = 50;
fn msg_load_req(area: Rect) -> u32 {
let n = area.height as u32;
n.max(MIN_MSG_LOAD)
}
struct Application {
store: AsyncProgramStore,
worker: Requester,
@ -190,8 +182,6 @@ impl Application {
}
f.set_cursor(cx, cy);
}
store.application.load_older(msg_load_req(area));
})?;
Ok(())