From b0f0050daf7123c29074ec2608d901ab2431f052 Mon Sep 17 00:00:00 2001 From: g4c Date: Fri, 27 Aug 2021 11:04:41 +0800 Subject: [PATCH] send tmux output --- mux/src/tmux.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mux/src/tmux.rs b/mux/src/tmux.rs index 36583420a..58807e092 100644 --- a/mux/src/tmux.rs +++ b/mux/src/tmux.rs @@ -84,8 +84,15 @@ impl TmuxDomainState { State::Idle => {} }, Event::Output { pane, text } => { - // TODO: write to pane's tmux queue - // TODO: decode string + let pane_map = self.remote_panes.borrow_mut(); + if let Some(ref_pane) = pane_map.get(pane) { + // TODO: handle escape? + let tmux_pane = ref_pane.lock().unwrap(); + tmux_pane + .tx + .send(text.to_string()) + .expect("send to tmux pane failed"); + } } Event::WindowAdd { window: _ } => { if self.gui_window_id.borrow().is_none() {