diff --git a/komorebi/src/workspace.rs b/komorebi/src/workspace.rs index 20e14fbb..d69ab4af 100644 --- a/komorebi/src/workspace.rs +++ b/komorebi/src/workspace.rs @@ -1022,7 +1022,7 @@ impl Workspace { .ok_or_else(|| anyhow!("there is no monocle container"))?; let container = container.clone(); - if restore_idx > self.containers().len() - 1 { + if restore_idx >= self.containers().len() { self.containers_mut() .resize(restore_idx, Container::default()); }