diff options
| author | akbash <akbash@herdr.dev> | 2026-08-18 00:11:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-18 00:11:20 +0300 |
| commit | 76211757ecce73cba981bdf6704954b25a100a8c (patch) | |
| tree | 8686202ba5d6bb32d13e9d911b3aa4236bb30a6c /src/app/input/navigate.rs | |
| parent | 19022d03c902de586009b1d156bc20b01ce48135 (diff) | |
fix: reap ctrl-click url openers (#2906)
* fix: reap ctrl-click url openers
refs #2903
* fix: scope linux opener test import
refs #2903
* test: isolate url opener regression
refs #2903
---------
Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Diffstat (limited to 'src/app/input/navigate.rs')
| -rw-r--r-- | src/app/input/navigate.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/app/input/navigate.rs b/src/app/input/navigate.rs index afe9e6e0..2cb657a7 100644 --- a/src/app/input/navigate.rs +++ b/src/app/input/navigate.rs @@ -937,7 +937,7 @@ impl App { command.current_dir(cwd); } let child = command.spawn()?; - self.detached_custom_command_children.push(child); + self.detached_process_children.push(child); Ok(()) } @@ -2015,9 +2015,9 @@ mod tests { use crossterm::event::{KeyCode, KeyEvent, KeyModifiers, ModifierKeyCode}; use ratatui::layout::Direction; - #[cfg(unix)] - use super::super::wait_for_file; use super::super::{state_with_workspaces, unique_temp_path}; + #[cfg(unix)] + use super::super::{wait_for_detached_process_reap, wait_for_file}; use super::*; use crate::{ app::App, @@ -3543,16 +3543,10 @@ navigate_pane_down = "ctrl+j" assert_eq!(app.state.mode, Mode::Terminal); std::fs::write(&release_path, b"release").expect("release command"); - let deadline = tokio::time::Instant::now() + Duration::from_secs(2); - while crate::platform::process_exists(pid) && tokio::time::Instant::now() < deadline { - app.reap_finished_custom_commands(); - tokio::time::sleep(Duration::from_millis(20)).await; - } - app.reap_finished_custom_commands(); - let reaped_by_runtime = !crate::platform::process_exists(pid); + let reaped_by_runtime = wait_for_detached_process_reap(&mut app, pid).await; if !reaped_by_runtime { if let Some(child) = app - .detached_custom_command_children + .detached_process_children .iter_mut() .find(|child| child.id() == pid) { |
