diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-07 15:09:09 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-07 15:09:09 +0300 |
| commit | 0276da6f2a44da493d1c198bcc6b5a8b1d2fda44 (patch) | |
| tree | 4362a0c52fa42097d2c6fabc8212e4d01ddd459c /src | |
| parent | 78fc0721a3d014fe96e778c6bb452cfdfbe67603 (diff) | |
fix: make pane run submit commands atomically
Diffstat (limited to 'src')
| -rw-r--r-- | src/cli.rs | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -596,19 +596,8 @@ fn pane_run(args: &[String]) -> std::io::Result<i32> { } let pane_id = normalize_pane_id(&args[0]); - let text = args[1..].join(" "); - let send_text_status = send_ok_request(Method::PaneSendText(PaneSendTextParams { - pane_id: pane_id.clone(), - text, - }))?; - if send_text_status != 0 { - return Ok(send_text_status); - } - - send_ok_request(Method::PaneSendKeys(PaneSendKeysParams { - pane_id, - keys: vec!["Enter".into()], - })) + let text = format!("{}\r", args[1..].join(" ")); + send_ok_request(Method::PaneSendText(PaneSendTextParams { pane_id, text })) } fn integration_install(args: &[String]) -> std::io::Result<i32> { |
