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 <conrad@zed.dev>
This commit is contained in:
Piotr Osiewicz 2025-05-08 08:42:32 +02:00 committed by GitHub
parent 3615d6d96c
commit f16f4303f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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::<DebuggerFeatureFlag>() {
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 {