cargo fmt
This commit is contained in:
parent
1a84c5f4ec
commit
6769627c36
3 changed files with 12 additions and 19 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -246,9 +246,8 @@ impl InputHandler {
|
|||
}
|
||||
Action::ToggleActiveSyncPanes => {
|
||||
self.send_screen_instructions
|
||||
.send(ScreenInstruction::ToggleActiveSyncPanes)
|
||||
.unwrap();
|
||||
|
||||
.send(ScreenInstruction::ToggleActiveSyncPanes)
|
||||
.unwrap();
|
||||
}
|
||||
Action::CloseTab => {
|
||||
self.command_is_executing.closing_pane();
|
||||
|
|
|
|||
|
|
@ -323,8 +323,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs) {
|
|||
let active_tab = screen.get_active_tab_mut().unwrap();
|
||||
match active_tab.is_sync_panes_active() {
|
||||
true => active_tab.write_to_terminals_on_current_tab(bytes),
|
||||
false => active_tab
|
||||
.write_to_active_terminal(bytes),
|
||||
false => active_tab.write_to_active_terminal(bytes),
|
||||
}
|
||||
}
|
||||
ScreenInstruction::ResizeLeft => {
|
||||
|
|
@ -455,7 +454,6 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs) {
|
|||
ScreenInstruction::Quit => {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue