diff options
author | Brooks Rady <b.j.rady@gmail.com> | 2021-08-31 16:42:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 16:42:34 +0100 |
commit | 18dca848e6c4d59bc7c672a0863158daf8182ef2 (patch) | |
tree | 690247fbdf5395cc02e402c8ea5bcb2c891f6995 /zellij-server/src/ui | |
parent | 5228e449becf6da2c663906b978797d4637ce884 (diff) |
fix(ui): offset content after viewport construction
Diffstat (limited to 'zellij-server/src/ui')
-rw-r--r-- | zellij-server/src/ui/pane_resizer.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/zellij-server/src/ui/pane_resizer.rs b/zellij-server/src/ui/pane_resizer.rs index 0213f6d52..76153597c 100644 --- a/zellij-server/src/ui/pane_resizer.rs +++ b/zellij-server/src/ui/pane_resizer.rs @@ -1,4 +1,4 @@ -use crate::{os_input_output::ServerOsApi, panes::PaneId, tab::Pane}; +use crate::{panes::PaneId, tab::Pane}; use cassowary::{ strength::{REQUIRED, STRONG}, Expression, Solver, Variable, @@ -12,7 +12,6 @@ use zellij_utils::{ pub struct PaneResizer<'a> { panes: HashMap<&'a PaneId, &'a mut Box<dyn Pane>>, - os_api: &'a mut Box<dyn ServerOsApi>, vars: HashMap<PaneId, Variable>, solver: Solver, } @@ -31,10 +30,7 @@ struct Span { type Grid = Vec<Vec<Span>>; impl<'a> PaneResizer<'a> { - pub fn new( - panes: impl Iterator<Item = (&'a PaneId, &'a mut Box<dyn Pane>)>, - os_api: &'a mut Box<dyn ServerOsApi>, - ) -> Self { + pub fn new(panes: impl Iterator<Item = (&'a PaneId, &'a mut Box<dyn Pane>)>) -> Self { let panes: HashMap<_, _> = panes.collect(); let mut vars = HashMap::new(); for &&k in panes.keys() { @@ -42,7 +38,6 @@ impl<'a> PaneResizer<'a> { } PaneResizer { panes, - os_api, vars, solver: Solver::new(), } @@ -146,13 +141,6 @@ impl<'a> PaneResizer<'a> { } else { pane.set_geom(new_geom); } - if let PaneId::Terminal(pid) = pane.pid() { - self.os_api.set_terminal_size_using_fd( - pid, - pane.get_content_columns() as u16, - pane.get_content_rows() as u16, - ); - } } } |