From ce66c5ed88ac429d946530fa90483d8cfc56ac02 Mon Sep 17 00:00:00 2001 From: keith Date: Sun, 30 Aug 2020 12:46:17 -0700 Subject: [PATCH] missed minor fix --- src/editor/mod.rs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 091688d..ad40f75 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -259,19 +259,17 @@ impl Editor { window.anchor_type = WindowAnchor::NorthWest; window.anchor_row = row as f64; window.anchor_column = 0.0; - } else { - if let Some(parent) = self.windows.get(&1) { - let new_window = Window::new( - grid, - parent.grid.width, - 1, - None, - WindowAnchor::NorthWest, - row as f64, - 0.0, - ); - self.windows.insert(grid, new_window); - } + } else if let Some(parent) = self.windows.get(&1) { + let new_window = Window::new( + grid, + parent.grid.width, + 1, + None, + WindowAnchor::NorthWest, + row as f64, + 0.0, + ); + self.windows.insert(grid, new_window); } if let Some(parent) = self.windows.get_mut(&1) {