From 3bdf05c0cdc389796fa4d22c1b05fc6c0f51f2dc Mon Sep 17 00:00:00 2001 From: K Simmons Date: Tue, 9 Aug 2022 16:11:01 -0700 Subject: [PATCH] fix up command palette --- crates/command_palette/src/command_palette.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/command_palette/src/command_palette.rs b/crates/command_palette/src/command_palette.rs index 6bef826e5b..46327cf1bc 100644 --- a/crates/command_palette/src/command_palette.rs +++ b/crates/command_palette/src/command_palette.rs @@ -86,8 +86,8 @@ impl CommandPalette { let focused_view_id = cx.focused_view_id(window_id).unwrap_or(workspace.id()); cx.as_mut().defer(move |cx| { + let this = cx.add_view(workspace.clone(), |cx| Self::new(focused_view_id, cx)); workspace.update(cx, |workspace, cx| { - let this = cx.add_view(|cx| Self::new(focused_view_id, cx)); workspace.toggle_modal(cx, |_, cx| { cx.subscribe(&this, Self::on_event).detach(); this