From 00cccdc62aac16c3b7cbf42b7b2dd8dfebb45563 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 4 Sep 2021 09:19:19 +0300 Subject: [PATCH] Don't show thread picker for single-threaded targets --- helix-term/src/commands/dap.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index f67669d9c..bb92b3ac9 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -97,6 +97,11 @@ fn thread_picker(cx: &mut Context, callback_fn: impl Fn(&mut Editor, &dap::Threa } }; + if threads.len() == 1 { + callback_fn(cx.editor, &threads[0]); + return; + } + let picker = Picker::new( true, threads,