Skip to content

Commit

Permalink
Merge pull request #8 from jooooscha/alternate_screen
Browse files Browse the repository at this point in the history
Use alternate screen
  • Loading branch information
proycon committed Jun 6, 2021
2 parents b422a66 + b8709df commit f26e033
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bin/vocage.rs
Expand Up @@ -6,6 +6,7 @@ extern crate vocage;


use termion::event::Key;
use termion::screen::AlternateScreen;
use termion::input::TermRead;
use termion::raw::{IntoRawMode};
use termion::color;
Expand Down Expand Up @@ -319,6 +320,9 @@ fn main() {


pub fn draw(stdout: &mut impl Write, card: Option<&VocaCard>, session: &VocaSession, side: u8, status: &str, seqnr: usize, duecards: usize, minimal: Option<PrintFormat>) {

let mut stdout = AlternateScreen::from(stdout);

let (width, height) = if minimal.is_none() {
termion::terminal_size().expect("terminal size")
} else {
Expand Down

0 comments on commit f26e033

Please sign in to comment.