~proycon/vocage

f26e0331f05a2dd9aceaa0b339f1c8531b5a7917 — Maarten van Gompel a month ago b422a66 + b8709df master
Merge pull request #8 from jooooscha/alternate_screen

Use alternate screen
1 files changed, 4 insertions(+), 0 deletions(-)

M src/bin/vocage.rs
M src/bin/vocage.rs => src/bin/vocage.rs +4 -0
@@ 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;


@@ 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 {