Fix panicking unwrap()

This commit is contained in:
Conrad Irwin 2023-11-14 11:27:52 -07:00
parent bb584cc7c4
commit b69b5742ed
4 changed files with 5 additions and 10 deletions

View file

@ -32,9 +32,7 @@ pub struct CommandPalette {
impl CommandPalette {
fn register(workspace: &mut Workspace, _: &mut ViewContext<Workspace>) {
dbg!("registering command palette toggle");
workspace.register_action(|workspace, _: &Toggle, cx| {
dbg!("got cmd-shift-p");
let Some(previous_focus_handle) = cx.focused() else {
return;
};