Skip to content

Commit

Permalink
Clear screen before running the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-cpsn committed Feb 22, 2024
1 parent 14e72ed commit 56456ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ impl App<'_> {
}

pub async fn run(&mut self, mut terminal: Terminal<impl Backend>) -> std::io::Result<()> {
terminal.clear()?;

while !self.should_quit {
self.draw(&mut terminal)?;
self.should_quit = self.handle_events().await?;
Expand Down

0 comments on commit 56456ec

Please sign in to comment.