diff --git a/Cargo.lock b/Cargo.lock index bbe6f51..b3dc2d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,7 +141,7 @@ dependencies = [ [[package]] name = "thumbs" -version = "0.4.1" +version = "0.4.2" dependencies = [ "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/src/view.rs b/src/view.rs index e3faa98..8416959 100644 --- a/src/view.rs +++ b/src/view.rs @@ -238,10 +238,12 @@ impl<'a> View<'a> { } Err(err) => panic!(err), } + + stdin.keys().for_each(|_| { /* Skip the rest of stdin buffer */ }) } _ => { // Nothing in the buffer. Wait for a bit... - std::thread::sleep(std::time::Duration::from_millis(100)); + std::thread::sleep(std::time::Duration::from_millis(50)); continue; // don't render again if nothing new to show } }