diff options
| author | Aram Drevekenin <aram@poor.dev> | 2021-02-09 17:36:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-09 17:36:37 +0100 |
| commit | 14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c (patch) | |
| tree | 7e25be8c93e85ec9fc03335f1993f319f713c614 /src/client/tab.rs | |
| parent | Merge pull request #158 from mosaic-org/add-files (diff) | |
| download | sl0ppij-14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c.tar.gz sl0ppij-14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c.tar.xz sl0ppij-14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c.zip | |
feat(ui): new keybindings and status bar (#160)
* work
* feat(statusbar): new design and keybindings
* fix(ipc): add missing const
* style(fmt): rustfmt
* style(input): remove accidental comment
Diffstat (limited to 'src/client/tab.rs')
| -rw-r--r-- | src/client/tab.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/tab.rs b/src/client/tab.rs index 3b49a1c4..b7f0e5c2 100644 --- a/src/client/tab.rs +++ b/src/client/tab.rs @@ -11,6 +11,8 @@ use std::{ }; use std::{io::Write, sync::mpsc::channel}; +use crate::utils::logging::debug_log_to_file; + /* * Tab * @@ -86,6 +88,7 @@ pub trait Pane { fn set_should_render(&mut self, should_render: bool); fn selectable(&self) -> bool; fn set_selectable(&mut self, selectable: bool); + fn set_invisible_borders(&mut self, invisible_borders: bool); fn set_max_height(&mut self, max_height: usize); fn render(&mut self) -> Option<String>; fn pid(&self) -> PaneId; @@ -155,6 +158,9 @@ pub trait Pane { fn max_height(&self) -> Option<usize> { None } + fn invisible_borders(&self) -> bool { + false + } } impl Tab { @@ -1895,6 +1901,15 @@ impl Tab { } } } + pub fn set_pane_invisible_borders(&mut self, id: PaneId, invisible_borders: bool) { + debug_log_to_file(format!( + "set_pane_invisible_borders: {:?}", + invisible_borders + )); + if let Some(pane) = self.panes.get_mut(&id) { + pane.set_invisible_borders(invisible_borders); + } + } pub fn set_pane_max_height(&mut self, id: PaneId, max_height: usize) { if let Some(pane) = self.panes.get_mut(&id) { pane.set_max_height(max_height); |
