diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index e07e0df8f728b9e90de4f1b9f870e0f409a7cae7..65835cc79b29f90eaddf88977cf9ec72794ed438 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -9160,6 +9160,12 @@ impl Editor { Editor::for_multibuffer(excerpt_buffer, Some(workspace.project().clone()), true, cx) }); editor.update(cx, |editor, cx| { + if let Some(first_range) = ranges_to_highlight.first() { + editor.change_selections(None, cx, |selections| { + selections.clear_disjoint(); + selections.select_anchor_ranges(std::iter::once(first_range.clone())); + }); + } editor.highlight_background::( &ranges_to_highlight, |theme| theme.editor_highlighted_line_background,