Skip to content

Commit

Permalink
workspace_set_idx
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 committed Feb 8, 2025
1 parent bf3132e commit 8c3915a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,28 @@ impl Workspaces {
set.active += 1;
}
set.workspaces.insert(insert_idx, workspace);

for (i, workspace) in set.workspaces.iter_mut().enumerate() {
workspace_set_idx(
workspace_state,
i as u8 + 1,
set.idx,
&workspace.handle,
);
}

if set.group != old_group {
let old_set = self.sets.values_mut().find(|s| s.group == old_group).unwrap();
for (i, workspace) in old_set.workspaces.iter_mut().enumerate() {
workspace_set_idx(
workspace_state,
i as u8 + 1,
old_set.idx,
&workspace.handle,
);
}
}

return;
}
}
Expand Down

0 comments on commit 8c3915a

Please sign in to comment.