Skip to content

Commit

Permalink
fix(wm): avoid out of range subtraction
Browse files Browse the repository at this point in the history
This fixes the panic, but not the underlying problem.

Updates #757
Updates #758
  • Loading branch information
raggi committed Apr 14, 2024
1 parent b476bee commit efa562d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion komorebi/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit efa562d

Please sign in to comment.