summaryrefslogtreecommitdiff
path: root/helix-term/src/commands/dap.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-09-03 03:38:38 +0000
committerSkyler Hawthorne2022-10-19 02:31:39 +0000
commitb530a86d1f15cc7df0e1ae8aa4bd02109ac33a8f (patch)
treea2dce789418ecc463490a98ee90a4da3631a076f /helix-term/src/commands/dap.rs
parentb3fc31a211293f48696d26855781577d1859c2c6 (diff)
remove Callback::Compositor variant
To reduce likelihood of accidental discarding of important callbacks
Diffstat (limited to 'helix-term/src/commands/dap.rs')
-rw-r--r--helix-term/src/commands/dap.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index 9c067eba..c27417e3 100644
--- a/helix-term/src/commands/dap.rs
+++ b/helix-term/src/commands/dap.rs
@@ -277,10 +277,11 @@ pub fn dap_launch(cx: &mut Context) {
let completions = template.completion.clone();
let name = template.name.clone();
let callback = Box::pin(async move {
- let call: Callback = Callback::Compositor(Box::new(move |compositor| {
- let prompt = debug_parameter_prompt(completions, name, Vec::new());
- compositor.push(Box::new(prompt));
- }));
+ let call: Callback =
+ Callback::EditorCompositor(Box::new(move |_editor, compositor| {
+ let prompt = debug_parameter_prompt(completions, name, Vec::new());
+ compositor.push(Box::new(prompt));
+ }));
Ok(call)
});
cx.jobs.callback(callback);
@@ -335,10 +336,11 @@ fn debug_parameter_prompt(
let config_name = config_name.clone();
let params = params.clone();
let callback = Box::pin(async move {
- let call: Callback = Callback::Compositor(Box::new(move |compositor| {
- let prompt = debug_parameter_prompt(completions, config_name, params);
- compositor.push(Box::new(prompt));
- }));
+ let call: Callback =
+ Callback::EditorCompositor(Box::new(move |_editor, compositor| {
+ let prompt = debug_parameter_prompt(completions, config_name, params);
+ compositor.push(Box::new(prompt));
+ }));
Ok(call)
});
cx.jobs.callback(callback);