From 1d0967cdda39f0e2dc599626b575063d77a0bf45 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Mon, 6 Apr 2026 14:18:59 -0400 Subject: [PATCH] Fix compilation on main (#53257) Semantic merge conflict due to multibuffer API changes Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A --- crates/project_symbols/src/project_symbols.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/project_symbols/src/project_symbols.rs b/crates/project_symbols/src/project_symbols.rs index 351b6e7afb59ef9b7ffd545d36b0e3dd66c6e834..931e332d93d869bc31909643190d5b35f32409dc 100644 --- a/crates/project_symbols/src/project_symbols.rs +++ b/crates/project_symbols/src/project_symbols.rs @@ -1,6 +1,4 @@ -use editor::{ - Anchor, Bias, Editor, SelectionEffects, scroll::Autoscroll, styled_runs_for_code_label, -}; +use editor::{Bias, Editor, SelectionEffects, scroll::Autoscroll, styled_runs_for_code_label}; use fuzzy::{StringMatch, StringMatchCandidate}; use gpui::{ App, Context, DismissEvent, Entity, HighlightStyle, ParentElement, StyledText, Task, TextStyle, @@ -143,13 +141,14 @@ impl PickerDelegate for ProjectSymbolsDelegate { editor.update(cx, |editor, cx| { let multibuffer_snapshot = editor.buffer().read(cx).snapshot(cx); - let Some((excerpt_id, _, buffer_snapshot)) = - multibuffer_snapshot.as_singleton() - else { + let Some(buffer_snapshot) = multibuffer_snapshot.as_singleton() else { return; }; let text_anchor = buffer_snapshot.anchor_before(position); - let anchor = Anchor::in_buffer(excerpt_id, text_anchor); + let Some(anchor) = multibuffer_snapshot.anchor_in_buffer(text_anchor) + else { + return; + }; editor.change_selections( SelectionEffects::scroll(Autoscroll::center()), window,