diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-01-06 16:41:02 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-01-06 16:41:02 +0000 |
| commit | fc2205c41542c6a1134854bd493036aa1d2238ce (patch) | |
| tree | 06781e340b39a1ec664ea26f32daa6be7e98d9cb /src/screen.rs | |
| parent | Functional drawing of plugins to the screen (diff) | |
| download | sl0ppij-fc2205c41542c6a1134854bd493036aa1d2238ce.tar.gz sl0ppij-fc2205c41542c6a1134854bd493036aa1d2238ce.tar.xz sl0ppij-fc2205c41542c6a1134854bd493036aa1d2238ce.zip | |
The RawFd has been slain...
Diffstat (limited to 'src/screen.rs')
| -rw-r--r-- | src/screen.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/screen.rs b/src/screen.rs index a91b6811..c321f43d 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -2,12 +2,12 @@ use std::collections::BTreeMap; use std::os::unix::io::RawFd; use std::sync::mpsc::Receiver; -use crate::layout::Layout; use crate::os_input_output::OsApi; use crate::pty_bus::{PtyInstruction, VteEvent}; use crate::tab::Tab; use crate::terminal_pane::PositionAndSize; use crate::{errors::ErrorContext, wasm_vm::PluginInstruction}; +use crate::{layout::Layout, terminal_pane::PaneId}; use crate::{AppInstruction, SenderWithContext}; /* @@ -23,9 +23,9 @@ use crate::{AppInstruction, SenderWithContext}; pub enum ScreenInstruction { Pty(RawFd, VteEvent), Render, - NewPane(RawFd), - HorizontalSplit(RawFd), - VerticalSplit(RawFd), + NewPane(PaneId), + HorizontalSplit(PaneId), + VerticalSplit(PaneId), WriteCharacter(Vec<u8>), ResizeLeft, ResizeRight, @@ -42,7 +42,7 @@ pub enum ScreenInstruction { ClearScroll, CloseFocusedPane, ToggleActiveTerminalFullscreen, - ClosePane(RawFd), + ClosePane(PaneId), ApplyLayout((Layout, Vec<RawFd>)), NewTab(RawFd), SwitchTabNext, @@ -94,7 +94,7 @@ impl Screen { self.send_plugin_instructions.clone(), self.send_app_instructions.clone(), self.max_panes, - Some(pane_id), + Some(PaneId::Terminal(pane_id)), ); self.active_tab_index = Some(tab_index); self.tabs.insert(tab_index, tab); @@ -139,7 +139,7 @@ impl Screen { self.switch_tab_prev(); } let mut active_tab = self.tabs.remove(&active_tab_index).unwrap(); - let pane_ids = active_tab.get_terminal_pane_ids(); + let pane_ids = active_tab.get_pane_ids(); self.send_pty_instructions .send(PtyInstruction::CloseTab(pane_ids)) .unwrap(); |
