From fb2631adce95276a17081f11d8738b9a5ef01f16 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 11 Oct 2024 13:09:44 -0700 Subject: [PATCH] Fix workspace indices when workspace is moved to another output Previously, workspace numbering could end up with numbers skipped, because an intermediate workspace was moved. --- src/shell/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 998af39f..c3a69295 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -678,6 +678,9 @@ impl Workspaces { if set.workspaces.is_empty() { set.add_empty_workspace(workspace_state); } + for (i, workspace) in set.workspaces.iter_mut().enumerate() { + workspace_set_idx(workspace_state, i as u8 + 1, set.idx, &workspace.handle); + } set.active = set .workspaces .iter()