diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-29 23:15:50 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-29 23:15:50 +0800 |
commit | 80979a179f924af87a33fc81ccca055ce6df5636 (patch) | |
tree | 05cfb353642fad61170e8584d0d9bdfe676dd0f8 /src/main.rs | |
parent | e811effe6424cd691260b07d1187d7c2d34ad4f1 (diff) |
Don't try to shutdown keyinput thread to not lose input events
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 9c42272..e9ea37e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ use failure::{Error, ResultExt}; use failure_tools::ok_or_exit; use std::{fs, io, io::Write, path::PathBuf, process}; use structopt::StructOpt; -use termion::{input::TermRead, raw::IntoRawMode, screen::AlternateScreen}; +use termion::{raw::IntoRawMode, screen::AlternateScreen}; use tui::backend::TermionBackend; use tui_react::Terminal; @@ -49,7 +49,7 @@ fn run() -> Result<(), Error> { paths_from(input)?, Interaction::Full, )? - .map(|mut app| app.process_events(&mut terminal, io::stdin().keys())); + .map(|(keys_rx, mut app)| app.process_events(&mut terminal, keys_rx.into_iter())); drop(terminal); io::stdout().flush().ok(); |