Skip to content

Commit

Permalink
Use remove/insert for columns instead of swapping
Browse files Browse the repository at this point in the history
Now with move-to-first/last this is relevant.
  • Loading branch information
YaLTeR committed Dec 29, 2023
1 parent 46d5f5e commit 6ccc414
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layout/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,8 @@ impl<W: LayoutElement> Workspace<W> {

let current_x = self.view_pos();

self.columns.swap(self.active_column_idx, new_idx);
let column = self.columns.remove(self.active_column_idx);
self.columns.insert(new_idx, column);

self.view_offset =
self.compute_new_view_offset_for_column(current_x, self.active_column_idx);
Expand Down

0 comments on commit 6ccc414

Please sign in to comment.