diff --git a/src/exec.rs b/src/exec.rs index 56c5eb9..06b51e1 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -277,7 +277,7 @@ impl ExecMode { } while let Ok(x) = async_tty.rx.recv() { - input.write(&[x]).await.ok(); + input.write_all(&[x]).await.ok(); } self.internal_cleanup()?; diff --git a/src/input_handler/mod.rs b/src/input_handler/mod.rs index 8f9cc36..77e79bc 100644 --- a/src/input_handler/mod.rs +++ b/src/input_handler/mod.rs @@ -224,6 +224,7 @@ impl InputHandler { .read(true) .write(true) .create(true) + .truncate(true) .open(&path)?, );