mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-22 16:48:33 +02: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"))?;
|
.ok_or_else(|| anyhow!("there is no monocle container"))?;
|
||||||
|
|
||||||
let container = container.clone();
|
let container = container.clone();
|
||||||
if restore_idx > self.containers().len() - 1 {
|
if restore_idx >= self.containers().len() {
|
||||||
self.containers_mut()
|
self.containers_mut()
|
||||||
.resize(restore_idx, Container::default());
|
.resize(restore_idx, Container::default());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user