From 280b8a89ea132f225b249ce743839c0cab96b05b Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 1 Oct 2024 12:40:18 -0400 Subject: [PATCH] editor: Allow opening excerpts from proposed changes editor (#18591) This PR adds the ability to open excerpts in the base buffer from the proposed changes editor. Release Notes: - N/A --- crates/editor/src/proposed_changes_editor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/proposed_changes_editor.rs b/crates/editor/src/proposed_changes_editor.rs index ec0c05d88382c0a898658716ff78875672f33156..a791e87e62053f4ed0ddf6b81192ad3216387873 100644 --- a/crates/editor/src/proposed_changes_editor.rs +++ b/crates/editor/src/proposed_changes_editor.rs @@ -11,7 +11,7 @@ use text::ToOffset; use ui::prelude::*; use workspace::{ searchable::SearchableItemHandle, Item, ItemHandle as _, ToolbarItemEvent, ToolbarItemLocation, - ToolbarItemView, + ToolbarItemView, Workspace, }; pub struct ProposedChangesEditor { @@ -159,6 +159,11 @@ impl Item for ProposedChangesEditor { None } } + + fn added_to_workspace(&mut self, workspace: &mut Workspace, cx: &mut ViewContext) { + self.editor + .update(cx, |editor, cx| editor.added_to_workspace(workspace, cx)); + } } impl ProposedChangesEditorToolbar {