This commit is contained in:
@@ -19,7 +19,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
_ => (80, 24),
|
_ => (80, 24),
|
||||||
};
|
};
|
||||||
println!("Width: {}, Height: {}", width, height);
|
println!("Width: {}, Height: {}", width, height);
|
||||||
let use_alternate_screen = false;
|
let use_alternate_screen = true;
|
||||||
let mut stdout = stdout();
|
let mut stdout = stdout();
|
||||||
if use_alternate_screen {
|
if use_alternate_screen {
|
||||||
execute!(stdout, EnterAlternateScreen)?;
|
execute!(stdout, EnterAlternateScreen)?;
|
||||||
@@ -35,6 +35,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
loop {
|
loop {
|
||||||
let blink = (blink_counter / 3) % 2 == 0;
|
let blink = (blink_counter / 3) % 2 == 0;
|
||||||
terminal.draw(|f| ui::draw(f, &app, blink))?;
|
terminal.draw(|f| ui::draw(f, &app, blink))?;
|
||||||
|
std::io::stdout().flush()?;
|
||||||
|
eprintln!("draw done");
|
||||||
blink_counter += 1;
|
blink_counter += 1;
|
||||||
let timeout = if app.show_welcome {
|
let timeout = if app.show_welcome {
|
||||||
std::time::Duration::from_millis(70)
|
std::time::Duration::from_millis(70)
|
||||||
|
|||||||
Reference in New Issue
Block a user