aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-02-12 13:21:33 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-05-04 20:47:49 +0530
commitd1a17ef3568938c4bdb28b3d90e465bed4e00962 (patch)
tree47e38fccb8ad035f6b83bebd15c511493067b21f /src
parentremove logs (diff)
downloadsl0ppij-d1a17ef3568938c4bdb28b3d90e465bed4e00962.tar.gz
sl0ppij-d1a17ef3568938c4bdb28b3d90e465bed4e00962.tar.xz
sl0ppij-d1a17ef3568938c4bdb28b3d90e465bed4e00962.zip
undo some changes
Diffstat (limited to 'src')
-rw-r--r--src/common/pty_bus.rs10
-rw-r--r--src/server/mod.rs6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/common/pty_bus.rs b/src/common/pty_bus.rs
index 5fa3d048..3c5183e9 100644
--- a/src/common/pty_bus.rs
+++ b/src/common/pty_bus.rs
@@ -292,7 +292,7 @@ impl PtyBus {
self.id_to_child_pid.insert(pid_primary, pid_secondary);
pid_primary
}
- pub fn spawn_terminals_for_layout(&mut self, layout_path: PathBuf, err_ctx: ErrorContext) {
+ pub fn spawn_terminals_for_layout(&mut self, layout_path: PathBuf) {
let layout = Layout::new(layout_path.clone());
let total_panes = layout.total_terminal_panes();
let mut new_pane_pids = vec![];
@@ -312,7 +312,7 @@ impl PtyBus {
self.task_handles.insert(id, task_handle);
}
}
- pub fn close_pane(&mut self, id: PaneId, err_ctx: ErrorContext) {
+ pub fn close_pane(&mut self, id: PaneId) {
match id {
PaneId::Terminal(id) => {
let child_pid = self.id_to_child_pid.remove(&id).unwrap();
@@ -328,9 +328,9 @@ impl PtyBus {
.unwrap(),
}
}
- pub fn close_tab(&mut self, ids: Vec<PaneId>, err_ctx: ErrorContext) {
+ pub fn close_tab(&mut self, ids: Vec<PaneId>) {
ids.iter().for_each(|&id| {
- self.close_pane(id, err_ctx);
+ self.close_pane(id);
});
}
}
@@ -339,7 +339,7 @@ impl Drop for PtyBus {
fn drop(&mut self) {
let child_ids: Vec<RawFd> = self.id_to_child_pid.keys().copied().collect();
for id in child_ids {
- self.close_pane(PaneId::Terminal(id), ErrorContext::new());
+ self.close_pane(PaneId::Terminal(id));
}
}
}
diff --git a/src/server/mod.rs b/src/server/mod.rs
index 1da079eb..f739d0bc 100644
--- a/src/server/mod.rs
+++ b/src/server/mod.rs
@@ -91,7 +91,7 @@ pub fn start_server(
}
PtyInstruction::NewTab => {
if let Some(layout) = maybe_layout.clone() {
- pty_bus.spawn_terminals_for_layout(layout, err_ctx);
+ pty_bus.spawn_terminals_for_layout(layout);
} else {
let pid = pty_bus.spawn_terminal(None);
pty_bus
@@ -101,11 +101,11 @@ pub fn start_server(
}
}
PtyInstruction::ClosePane(id) => {
- pty_bus.close_pane(id, err_ctx);
+ pty_bus.close_pane(id);
command_is_executing.done_closing_pane();
}
PtyInstruction::CloseTab(ids) => {
- pty_bus.close_tab(ids, err_ctx);
+ pty_bus.close_tab(ids);
command_is_executing.done_closing_pane();
}
PtyInstruction::Quit => {