mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-20 16:43:57 +01:00
fix(wm): avoid out of range subtraction
This fixes the panic, but not the underlying problem. Updates #757 Updates #758
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user