From 0ea88d7e02b1393fe6f45cca1c78a50d3558b58a Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Thu, 24 Sep 2020 10:33:27 +0200 Subject: [PATCH] fix(resizing): properly resize panes up --- src/screen.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screen.rs b/src/screen.rs index 1c82f48b..9e0d573b 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -638,8 +638,8 @@ impl Screen { fn reduce_pane_and_surroundings_up(&mut self, id: &RawFd, count: u16) { let mut terminals_below = self.terminal_ids_directly_below(&id).expect("can't reduce pane size up if there are no terminals below"); let terminal_borders_below: HashSet = terminals_below.iter().map(|t| self.terminals.get(t).unwrap().x_coords).collect(); - let (left_resize_border, terminals_to_the_left) = self.top_aligned_contiguous_panes_to_the_left(&id, &terminal_borders_below); - let (right_resize_border, terminals_to_the_right) = self.top_aligned_contiguous_panes_to_the_right(&id, &terminal_borders_below); + let (left_resize_border, terminals_to_the_left) = self.bottom_aligned_contiguous_panes_to_the_left(&id, &terminal_borders_below); + let (right_resize_border, terminals_to_the_right) = self.bottom_aligned_contiguous_panes_to_the_right(&id, &terminal_borders_below); terminals_below.retain(|t| self.pane_is_between_vertical_borders(t, left_resize_border, right_resize_border)); self.reduce_pane_height_up(&id, count); for terminal_id in terminals_below {