Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions clock-tui/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ fn main() -> Result<(), Box<dyn Error>> {

// Setup terminal
enable_raw_mode()?;
let mut stdout = io::stdout();
stdout.execute(EnterAlternateScreen)?;
let backend = CrosstermBackend::new(&mut stdout);
let mut stderr = io::stderr();
stderr.execute(EnterAlternateScreen)?;
let backend = CrosstermBackend::new(&mut stderr);
let mut terminal = Terminal::new(backend)?;

// Load config and initialize app
Expand Down Expand Up @@ -64,7 +64,7 @@ fn main() -> Result<(), Box<dyn Error>> {
terminal.show_cursor()?;
drop(terminal);
disable_raw_mode()?;
stdout.execute(LeaveAlternateScreen)?;
stderr.execute(LeaveAlternateScreen)?;

// Perform logic such as printing the stopwatch time.
// Must be done after leaving alternate screen.
Expand Down