diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index b5c1fecbea..efb0bf9a1e 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1422,7 +1422,11 @@ impl EditorElement { layouts.push(layout); } - let player = editor.current_user_player_color(cx); + let mut player = editor.current_user_player_color(cx); + if !editor.is_focused(window) { + const UNFOCUS_EDITOR_SELECTION_OPACITY: f32 = 0.5; + player.selection = player.selection.opacity(UNFOCUS_EDITOR_SELECTION_OPACITY); + } selections.push((player, layouts)); if let SelectionDragState::Dragging {