diff options
author | Blaž Hrastnik | 2022-02-13 09:31:51 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-02-13 09:31:51 +0000 |
commit | bd549d8a20cce98e24c8653a4a86107c786cbaa3 (patch) | |
tree | 0780b58d41b6181e69023265cdb54517e2953778 /helix-term/src/commands | |
parent | 7ad8eaaef0b292f4be6c66298cea40d2b928e172 (diff) | |
parent | 7083b98a388b30e0b61caac9bf6ccc1d79eadf81 (diff) |
Merge remote-tracking branch 'origin/master' into debug
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r-- | helix-term/src/commands/dap.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index 58ef99f5..c73f9611 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -194,7 +194,7 @@ pub fn dap_start_impl( cx: &mut compositor::Context, name: Option<&str>, socket: Option<std::net::SocketAddr>, - params: Option<Vec<&str>>, + params: Option<Vec<std::borrow::Cow<str>>>, ) -> Result<(), anyhow::Error> { let doc = doc!(cx.editor); @@ -242,7 +242,7 @@ pub fn dap_start_impl( let mut param = x.to_string(); if let Some(DebugConfigCompletion::Advanced(cfg)) = template.completion.get(i) { if matches!(cfg.completion.as_deref(), Some("filename" | "directory")) { - param = std::fs::canonicalize(x) + param = std::fs::canonicalize(x.as_ref()) .ok() .and_then(|pb| pb.into_os_string().into_string().ok()) .unwrap_or_else(|| x.to_string()); @@ -408,7 +408,7 @@ fn debug_parameter_prompt( cx, Some(&config_name), None, - Some(params.iter().map(|x| x.as_str()).collect()), + Some(params.iter().map(|x| x.into()).collect()), ) { cx.editor.set_error(e.to_string()); } @@ -651,7 +651,7 @@ pub fn dap_variables(cx: &mut Context) { } let contents = Text::from(tui::text::Text::from(variables)); - let popup = Popup::new(contents); + let popup = Popup::new("dap-variables", contents); cx.push_layer(Box::new(popup)); } |