@@ -3482,12 +3482,17 @@ pub fn code_action(cx: &mut Context) {
34823482
34833483 cx.callback(
34843484 future,
3485− move |_editor: &mut Editor,
3485+ move |editor: &mut Editor,
34863486 compositor: &mut Compositor,
34873487 response: Option<lsp::CodeActionResponse>| {
34883488 if let Some(actions) = response {
3489+ if actions.is_empty() {
3490+ editor.set_status("No code actions available".to_owned());
3491+ return;
3492+ }
3493+
34893494 let picker = Picker::new(
3490− true,
3495+ false,
34913496 actions,
34923497 |action| match action {
34933498 lsp::CodeActionOrCommand::CodeAction(action) => {
@@ -3515,7 +3520,8 @@ pub fn code_action(cx: &mut Context) {
35153520 }
35163521 },
35173522 );
3518− compositor.push(Box::new(picker))
3523+ let popup = Popup::new("code-action", picker);
3524+ compositor.push(Box::new(popup))
35193525 }
35203526 },
35213527 )