diff options
| author | Aram Drevekenin <aram@poor.dev> | 2023-08-02 11:41:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-02 11:41:51 +0200 |
| commit | 192e6fd31ece0c73f8962f4af620a2757a2c1a2e (patch) | |
| tree | 6ae03596196acf35f6c71cc4dc79c309f2917d8b /zellij-utils/src/pane_size.rs | |
| parent | docs(changelog): plugin api utility functions (diff) | |
| download | sl0ppij-192e6fd31ece0c73f8962f4af620a2757a2c1a2e.tar.gz sl0ppij-192e6fd31ece0c73f8962f4af620a2757a2c1a2e.tar.xz sl0ppij-192e6fd31ece0c73f8962f4af620a2757a2c1a2e.zip | |
feat(ui): break pane to new tab and move panes between tabs (#2664)
* prototype
* some tests
* break out floating pane
* break out plugin panes
* add keybind and fix some minor issues
* remove cli
* move pane to left/right tab
* update ui
* adjust ui
* style(fmt): rustfmt
* style(comment): remove commented code
* update snapshots
Diffstat (limited to 'zellij-utils/src/pane_size.rs')
| -rw-r--r-- | zellij-utils/src/pane_size.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zellij-utils/src/pane_size.rs b/zellij-utils/src/pane_size.rs index 1df73a32..bef4f652 100644 --- a/zellij-utils/src/pane_size.rs +++ b/zellij-utils/src/pane_size.rs @@ -22,6 +22,12 @@ pub struct Viewport { pub cols: usize, } +impl Viewport { + pub fn has_positive_size(&self) -> bool { + self.rows > 0 && self.cols > 0 + } +} + #[derive(Clone, Copy, Debug, Default, Serialize, Deserialize, PartialEq, Eq)] pub struct Offset { pub top: usize, |
