summaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/application.rs23
1 files changed, 2 insertions, 21 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index db289f57..986df703 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -479,32 +479,13 @@ impl Application {
Payload::Response(_) => unreachable!(),
Payload::Request(request) => match request.command.as_str() {
RunInTerminal::COMMAND => {
- let mut arguments: dap::requests::RunInTerminalArguments =
+ let arguments: dap::requests::RunInTerminalArguments =
serde_json::from_value(request.arguments.unwrap_or_default()).unwrap();
// TODO: no unwrap
- log::error!("run_in_terminal {:?}", arguments);
-
- // HAXX: lldb-vscode uses $CWD/lldb-vscode which is wrong
- let program = arguments.args[0]
- .strip_prefix(
- std::env::current_dir()
- .expect("Couldn't get current working directory")
- .as_path()
- .to_str()
- .unwrap(),
- )
- .and_then(|arg| arg.strip_prefix('/'))
- .map(|arg| arg.to_owned())
- .unwrap_or_else(|| arguments.args[0].clone());
- arguments.args[0] = program;
-
- log::error!("{}", arguments.args.join(" "));
-
- // TODO: handle cwd
let process = std::process::Command::new("tmux")
.arg("split-window")
- .arg(arguments.args.join(" ")) // TODO: first arg is wrong, it uses current dir
+ .arg(arguments.args.join(" "))
.spawn()
.unwrap();