Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix panic with many participants

Conrad Irwin981858ef3c28
diff --git a/crates/ui/src/styles/color.rs b/crates/ui/src/styles/color.rs
index 434183e5606..1c9fd789d95 100644
--- a/crates/ui/src/styles/color.rs
+++ b/crates/ui/src/styles/color.rs
@@ -37,7 +37,7 @@ impl Color {
Color::Info => cx.theme().status().info,
Color::Placeholder => cx.theme().colors().text_placeholder,
Color::Accent => cx.theme().colors().text_accent,
- Color::Player(i) => cx.theme().styles.player.0[i.clone() as usize].cursor,
+ Color::Player(i) => cx.theme().styles.player.color_for_participant(*i).cursor,
Color::Error => cx.theme().status().error,
Color::Selected => cx.theme().colors().text_accent,
Color::Success => cx.theme().status().success,