Skip to content

Commit

Permalink
Use TTY alternate buffer and hide cursor.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulJuliusMartinez committed Aug 20, 2021
1 parent 72f1621 commit 6570011
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ use std::io;
use std::io::Read;
use std::path::PathBuf;
use structopt::StructOpt;
use termion::cursor::HideCursor;
use termion::raw::IntoRawMode;
use termion::screen::AlternateScreen;

mod flatjson;
mod input;
Expand All @@ -33,7 +35,7 @@ fn main() {
}
};

let stdout = io::stdout().into_raw_mode().unwrap();
let stdout = HideCursor::from(AlternateScreen::from(io::stdout().into_raw_mode().unwrap()));
let mut app = match jless::new(json_string, Box::new(stdout)) {
Ok(jl) => jl,
Err(err) => {
Expand Down

0 comments on commit 6570011

Please sign in to comment.