summaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-09-04 06:19:19 +0000
committerDmitry Sharshakov2021-09-04 06:19:19 +0000
commit00cccdc62aac16c3b7cbf42b7b2dd8dfebb45563 (patch)
treeb8fc806a5b2a070c623ccf9d59f5fce0d49f53dc /helix-term/src
parent9939dbf119f5f7820b914785a3550a745d4dbcf2 (diff)
Don't show thread picker for single-threaded targets
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/dap.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index f67669d9..bb92b3ac 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,