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.

picker: Give delegate the initial preview layout (#60007)

guopenghui2b0a83ea817d
diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs
index 2f9d0ad3c4f..7915e6fd001 100644
--- a/crates/picker/src/picker.rs
+++ b/crates/picker/src/picker.rs
@@ -547,6 +547,9 @@ impl<D: PickerDelegate> Picker<D> {
actions_menu_handle: PopoverMenuHandle::default(),
reopenable: true,
};
+ // give delegate the initial preview layout
+ this.delegate
+ .preview_layout_changed(matches!(initial_layout, preview::Layout::Right));
if this.reopenable {
let focus_handle = this.focus_handle(cx);
workspace::register_reopenable_picker(&focus_handle, cx);