summaryrefslogtreecommitdiff
path: root/helix-dap
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-05 05:43:34 +0000
committerBlaž Hrastnik2021-12-06 00:32:21 +0000
commit2b4de41bf0e0fc7d276e99f6359c9062df65473d (patch)
tree1c3e85b3a4a2d9762b98ba763030511224514153 /helix-dap
parentd5d1a9b1ae3bb7e02c86d0785e74f90358a048c6 (diff)
dap: Reply to RunInTerminal
Diffstat (limited to 'helix-dap')
-rw-r--r--helix-dap/src/client.rs3
-rw-r--r--helix-dap/src/types.rs8
2 files changed, 6 insertions, 5 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index c3840007..9598e24e 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -262,10 +262,11 @@ impl Client {
pub fn reply(
&self,
request_seq: u64,
- command: String,
+ command: &str,
result: core::result::Result<Value, Error>,
) -> impl Future<Output = Result<()>> {
let server_tx = self.server_tx.clone();
+ let command = command.to_string();
async move {
let response = match result {
diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs
index 3f61ba07..2c3df9c3 100644
--- a/helix-dap/src/types.rs
+++ b/helix-dap/src/types.rs
@@ -545,11 +545,11 @@ pub mod requests {
// Reverse Requests
- #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+ #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RunInTerminalResponse {
- pub process_id: Option<usize>,
- pub shell_process_id: Option<usize>,
+ pub process_id: Option<u32>,
+ pub shell_process_id: Option<u32>,
}
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
@@ -557,7 +557,7 @@ pub mod requests {
pub struct RunInTerminalArguments {
pub kind: Option<String>,
pub title: Option<String>,
- pub cwd: String,
+ pub cwd: Option<String>,
pub args: Vec<String>,
pub env: Option<HashMap<String, Option<String>>>,
}