From f16f4303f4e630ecc961171a60b0c62e6b7ce177 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Thu, 8 May 2025 08:42:32 +0200 Subject: [PATCH] debugger: Fix `spawn straight away` behavior when there's a single non-debug task on the line (#30154) Closes #ISSUE Release Notes: - N/A Co-authored-by: Conrad Irwin --- crates/editor/src/editor.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 2b468945602618d750d213e72613251114927cbd..fbaad6503219caf16cb699cfc356821af49216cb 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -5248,13 +5248,6 @@ impl Editor { tasks.column, )), }); - let spawn_straight_away = quick_launch - && resolved_tasks - .as_ref() - .map_or(false, |tasks| tasks.templates.len() == 1) - && code_actions - .as_ref() - .map_or(true, |actions| actions.is_empty()); let debug_scenarios = editor.update(cx, |editor, cx| { if cx.has_flag::() { maybe!({ @@ -5298,6 +5291,14 @@ impl Editor { vec![] } })?; + let spawn_straight_away = quick_launch + && resolved_tasks + .as_ref() + .map_or(false, |tasks| tasks.templates.len() == 1) + && code_actions + .as_ref() + .map_or(true, |actions| actions.is_empty()) + && debug_scenarios.is_empty(); if let Ok(task) = editor.update_in(cx, |editor, window, cx| { *editor.context_menu.borrow_mut() = Some(CodeContextMenu::CodeActions(CodeActionsMenu {