mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-20 16:43:57 +01:00
fix(wm): avoid out of range container focus op
This commit ensures that when floating the sole window visible on a workspace that the focused container index for the workspace will not be decremented below 0. re #787
This commit is contained in:
@@ -876,7 +876,7 @@ impl Workspace {
|
||||
self.containers_mut().remove(focused_idx);
|
||||
self.resize_dimensions_mut().remove(focused_idx);
|
||||
|
||||
if focused_idx == self.containers().len() {
|
||||
if focused_idx == self.containers().len() && focused_idx != 0 {
|
||||
self.focus_container(focused_idx - 1);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user