From 277791f0cab765e467ed9fec932af43ff273cdcb Mon Sep 17 00:00:00 2001 From: Brooks J Rady Date: Fri, 8 Jan 2021 13:58:18 +0000 Subject: [PATCH] Don't forget to tell split terminals that they have a new size! --- src/tab.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/tab.rs b/src/tab.rs index faf136a6..7a56508c 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -377,6 +377,14 @@ impl Tab { ); self.panes.insert(pid, Box::new(new_terminal)); + if let PaneId::Terminal(active_terminal_pid) = active_pane_id { + self.os_api.set_terminal_size_using_fd( + *active_terminal_pid, + top_winsize.columns as u16, + top_winsize.rows as u16, + ); + } + self.active_terminal = Some(pid); self.render(); } @@ -421,9 +429,16 @@ impl Tab { right_winsize.columns as u16, right_winsize.rows as u16, ); - self.panes.insert(pid, Box::new(new_terminal)); + if let PaneId::Terminal(active_terminal_pid) = active_pane_id { + self.os_api.set_terminal_size_using_fd( + *active_terminal_pid, + left_winsize.columns as u16, + left_winsize.rows as u16, + ); + } + self.active_terminal = Some(pid); self.render(); }