From d5764fb2254c4e3ed2af2a36ffc6f4acb5f0d37f Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Fri, 9 Sep 2022 12:30:58 +0200 Subject: [PATCH] fix(ui): sort multiple ui cursors (#1719) * fix(ui): stable-sort multiple ui cursors * style(clippy): make clippy happy --- zellij-server/src/ui/pane_contents_and_ui.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zellij-server/src/ui/pane_contents_and_ui.rs b/zellij-server/src/ui/pane_contents_and_ui.rs index b0eae8e8..779a6909 100644 --- a/zellij-server/src/ui/pane_contents_and_ui.rs +++ b/zellij-server/src/ui/pane_contents_and_ui.rs @@ -26,11 +26,12 @@ impl<'a> PaneContentsAndUi<'a> { multiple_users_exist_in_session: bool, z_index: Option, ) -> Self { - let focused_clients: Vec = active_panes + let mut focused_clients: Vec = active_panes .iter() .filter(|(_c_id, p_id)| **p_id == pane.pid()) .map(|(c_id, _p_id)| *c_id) .collect(); + focused_clients.sort_unstable(); PaneContentsAndUi { pane, output,