aboutsummaryrefslogtreecommitdiffstats
path: root/src/tui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui.rs')
-rw-r--r--src/tui.rs20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/tui.rs b/src/tui.rs
index 17b2eed..b74670f 100644
--- a/src/tui.rs
+++ b/src/tui.rs
@@ -66,18 +66,21 @@ impl Tui {
fn print(
&mut self,
idx: usize,
- event: crate::eval::CommandEvent,
+ event: tokio_pty_process_stream::Event,
) -> Result<()> {
match event {
- crate::eval::CommandEvent::CommandStart(cmd, args) => {
+ tokio_pty_process_stream::Event::CommandStart { cmd, args } => {
self.command_start(idx, &cmd, &args)
}
- crate::eval::CommandEvent::Output(out) => {
+ tokio_pty_process_stream::Event::Output { data: out } => {
self.command_output(idx, &out)
}
- crate::eval::CommandEvent::CommandExit(status) => {
+ tokio_pty_process_stream::Event::CommandExit { status } => {
self.command_exit(idx, status)
}
+ tokio_pty_process_stream::Event::Resize { size } => {
+ self.command_resize(idx, size)
+ }
}
}
@@ -126,6 +129,15 @@ impl Tui {
Ok(())
}
+ fn command_resize(
+ &mut self,
+ _idx: usize,
+ _size: (u16, u16),
+ ) -> Result<()> {
+ // TODO
+ Ok(())
+ }
+
fn poll_read(&mut self) {
if self.readline.is_none() && self.commands.is_empty() {
self.idx += 1;