From f28419cfd15f78950c394eb3bf5bc6d7e5cf6c05 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 8 May 2023 14:32:31 -0700 Subject: [PATCH] Fix styling of titlebar highlights --- crates/collab_ui/src/collab_titlebar_item.rs | 4 ++-- crates/rpc/src/proto.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index 117411b8d4..7374b166ca 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -201,12 +201,12 @@ impl CollabTitlebarItem { let mut title = String::new(); let mut names_and_branches = names_and_branches.peekable(); while let Some((name, entry)) = names_and_branches.next() { + let pre_index = index; push_str(&mut title, &mut index, name); + indices.extend((pre_index..index).into_iter()); if let Some(branch) = entry.and_then(|entry| entry.branch()) { push_str(&mut title, &mut index, "/"); - let pre_index = index; push_str(&mut title, &mut index, &branch); - indices.extend((pre_index..index).into_iter()) } if names_and_branches.peek().is_some() { push_str(&mut title, &mut index, ", "); diff --git a/crates/rpc/src/proto.rs b/crates/rpc/src/proto.rs index 564b97335e..20a457cc4b 100644 --- a/crates/rpc/src/proto.rs +++ b/crates/rpc/src/proto.rs @@ -504,7 +504,7 @@ pub fn split_worktree_update( done = message.updated_entries.is_empty() && message.removed_entries.is_empty(); - // Wait to send repositories until after we've guarnteed that their associated entries + // Wait to send repositories until after we've guaranteed that their associated entries // will be read let updated_repositories = if done { mem::take(&mut message.updated_repositories)