mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-11-10 15:34:25 +03:00
Increase poll timeout
Ref: https://github.com/sayanarijit/xplr/issues/10
This commit is contained in:
parent
ed65d85568
commit
b61bf9dcf2
@ -15,9 +15,10 @@ pub fn keep_reading(tx_msg_in: Sender<Task>, rx_event_reader: Receiver<bool>) {
|
||||
|
||||
if is_paused {
|
||||
thread::sleep(std::time::Duration::from_millis(200));
|
||||
} else if event::poll(std::time::Duration::from_millis(50)).unwrap_or_default() {
|
||||
} else if event::poll(std::time::Duration::from_millis(150)).unwrap_or_default() {
|
||||
// NOTE: The poll timeout need to stay low, else spawning sub subshell
|
||||
// and start typing immediately will cause panic.
|
||||
// To reproduce, press `:`, then press and hold `!`.
|
||||
match event::read() {
|
||||
Ok(Event::Key(key)) => {
|
||||
let key = Key::from_event(key);
|
||||
|
@ -164,7 +164,10 @@ impl Runner {
|
||||
let session_path = app.session_path().to_owned();
|
||||
|
||||
term::enable_raw_mode()?;
|
||||
|
||||
// Use a tty to enable piping results
|
||||
let mut stdout = get_tty()?;
|
||||
// let stdout = io::stdout();
|
||||
// let mut stdout = stdout.lock();
|
||||
execute!(stdout, term::EnterAlternateScreen)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user