aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDante Pippi <6619666+dantepippi@users.noreply.github.com>2021-04-27 14:44:09 -0300
committerDante Pippi <6619666+dantepippi@users.noreply.github.com>2021-04-28 11:16:06 -0300
commit6769627c3677e22a69b9059b1d85b00bd0d29bbb (patch)
treefdc6e4edc2806316440c51001af40d9eed350302 /src/client
parentNew feature: Synchronize text sent to panes (diff)
downloadsl0ppij-6769627c3677e22a69b9059b1d85b00bd0d29bbb.tar.gz
sl0ppij-6769627c3677e22a69b9059b1d85b00bd0d29bbb.tar.xz
sl0ppij-6769627c3677e22a69b9059b1d85b00bd0d29bbb.zip
cargo fmt
Diffstat (limited to 'src/client')
-rw-r--r--src/client/tab.rs22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/client/tab.rs b/src/client/tab.rs
index 23146eba..f9d98ace 100644
--- a/src/client/tab.rs
+++ b/src/client/tab.rs
@@ -596,22 +596,18 @@ impl Tab {
}
pub fn write_to_terminals_on_current_tab(&mut self, input_bytes: Vec<u8>) {
let pane_ids = self.get_pane_ids();
- pane_ids.iter().for_each(|pane_id| {
- match pane_id {
- PaneId::Terminal(pid) => {
- self.write_to_pane_id(input_bytes.clone(), *pid);
- }
- PaneId::Plugin(_) => {}
+ pane_ids.iter().for_each(|pane_id| match pane_id {
+ PaneId::Terminal(pid) => {
+ self.write_to_pane_id(input_bytes.clone(), *pid);
}
- });
+ PaneId::Plugin(_) => {}
+ });
}
- pub fn write_to_pane_id(&mut self, mut input_bytes: Vec<u8>, pid:RawFd) {
+ pub fn write_to_pane_id(&mut self, mut input_bytes: Vec<u8>, pid: RawFd) {
self.os_api
- .write_to_tty_stdin(pid, &mut input_bytes)
- .expect("failed to write to terminal");
- self.os_api
- .tcdrain(pid)
- .expect("failed to drain terminal");
+ .write_to_tty_stdin(pid, &mut input_bytes)
+ .expect("failed to write to terminal");
+ self.os_api.tcdrain(pid).expect("failed to drain terminal");
}
pub fn write_to_active_terminal(&mut self, input_bytes: Vec<u8>) {
match self.get_active_pane_id() {