diff options
author | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-25 15:51:39 +0000 |
---|---|---|
committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-25 15:51:39 +0000 |
commit | 84a5cf95d1168db47931f81774e1210e1f022a69 (patch) | |
tree | 9060e6e63e5958e6979807da310e61090492da13 /zellij-tile/src | |
parent | 0371c111b795b8ff5ad852b22528f5caa3a2c7b0 (diff) |
Converted tab updates to the new generic update() function
Diffstat (limited to 'zellij-tile/src')
-rw-r--r-- | zellij-tile/src/data.rs | 2 | ||||
-rw-r--r-- | zellij-tile/src/lib.rs | 8 | ||||
-rw-r--r-- | zellij-tile/src/shim.rs | 4 |
3 files changed, 1 insertions, 13 deletions
diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs index 67bf0d742..9576285a8 100644 --- a/zellij-tile/src/data.rs +++ b/zellij-tile/src/data.rs @@ -28,7 +28,7 @@ pub enum Key { #[strum_discriminants(name(EventType))] pub enum Event { ModeUpdate(ModeInfo), - TabUpdate(TabInfo), + TabUpdate(Vec<TabInfo>), KeyPress(Key), } diff --git a/zellij-tile/src/lib.rs b/zellij-tile/src/lib.rs index 771edb2dd..cff3624d0 100644 --- a/zellij-tile/src/lib.rs +++ b/zellij-tile/src/lib.rs @@ -10,7 +10,6 @@ pub trait ZellijTile { fn update(&mut self, event: Event) {} fn render(&mut self, rows: usize, cols: usize) {} // FIXME: Everything below this line should be purged - fn update_tabs(&mut self) {} fn handle_tab_rename_keypress(&mut self, key: Key) {} } @@ -44,13 +43,6 @@ macro_rules! register_tile { } #[no_mangle] - pub fn update_tabs() { - STATE.with(|state| { - state.borrow_mut().update_tabs(); - }) - } - - #[no_mangle] pub fn handle_tab_rename_keypress() { STATE.with(|state| { state diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index bbdf5fcc3..1bb8ccabc 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -36,10 +36,6 @@ pub fn set_selectable(selectable: bool) { unsafe { host_set_selectable(selectable) }; } -pub fn get_tabs() -> Vec<TabInfo> { - deserialize_from_stdin().unwrap_or_default() -} - #[doc(hidden)] // FIXME: Make this just return T and do a .unwrap() at the end; also naming? pub fn deserialize_from_stdin<T: DeserializeOwned>() -> Option<T> { |