@@ -902,29 +902,11 @@ impl EditorView {
902902 cxt: &mut commands::Context,
903903 event: KeyEvent,
904904 ) -> Option<KeymapResult> {
905− if let Some(picker) = cxt.editor.debug_config_picker.clone() {
906− match event {
907− KeyEvent {
908− code: KeyCode::Esc, ..
909− } => {}
910− KeyEvent {
911− code: KeyCode::Char(char),
912− ..
913− } => {
914− let (i, name) = match picker.iter().position(|t| t.starts_with(char)) {
915− Some(pos) => (pos, picker.get(pos).unwrap().clone()),
916− None => return None,
917− };
918− let completions = cxt.editor.debug_config_completions.clone().unwrap();
919− let completion = completions.get(i).unwrap().clone();
920− if !completion.is_empty() {
921− let prompt = Self::debug_parameter_prompt(completion, name, Vec::new());
922− cxt.push_layer(Box::new(prompt));
923− }
924− }
925− _ => return None,
926− }
927− cxt.editor.debug_config_picker = None;
905+ if !cxt.editor.debug_config_completions.is_empty() {
906+ let completions = std::mem::take(&mut cxt.editor.debug_config_completions);
907+ // TODO name
908+ let prompt = Self::debug_parameter_prompt(completions, "test".to_string(), Vec::new());
909+ cxt.push_layer(Box::new(prompt));
928910 return None;
929911 }
930912
@@ -1429,26 +1411,6 @@ impl Component for EditorView {
14291411 info.render(area, surface, cx);
14301412 }
14311413
1432− if let Some(ref configs) = cx.editor.debug_config_picker {
1433− let mut text = String::new();
1434− let mut height = 0;
1435− let mut max_len = 20;
1436−
1437− for line in configs {
1438− max_len = max_len.max(line.len() as u16 + 2);
1439− height += 1;
1440− text.push_str(&format!("{} {}\n", line.chars().next().unwrap(), line));
1441− }
1442−
1443− let mut info = Info {
1444− height: 20.min(height + 1),
1445− width: 70.min(max_len),
1446− title: "Debug targets".to_owned(),
1447− text: text + "Exit Esc",
1448− };
1449− info.render(area, surface, cx);
1450− }
1451−
14521414 if cx.editor.config.auto_info {
14531415 if let Some(ref mut info) = self.autoinfo {
14541416 info.render(area, surface, cx);