From b76adc155d979705a353fd6dc87c702f9dfc6c22 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Sat, 1 Aug 2026 04:27:50 +0300 Subject: fix(input): preserve native key lifecycle across routing (#2142) refs #2077 Co-authored-by: Jonathan Liebig --- src/app/worktrees.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/app/worktrees.rs') diff --git a/src/app/worktrees.rs b/src/app/worktrees.rs index 23e17b4d..0087c8fe 100644 --- a/src/app/worktrees.rs +++ b/src/app/worktrees.rs @@ -997,14 +997,12 @@ impl App { ws_idx: usize, ) { for terminal_id in self.state.terminal_ids_for_workspace(ws_idx) { - if let Some(runtime) = self.terminal_runtimes.remove(&terminal_id) { - tracing::debug!( - workspace_index = ws_idx, - terminal_id = %terminal_id, - "shutting down terminal runtime before worktree removal" - ); - runtime.shutdown(); - } + tracing::debug!( + workspace_index = ws_idx, + terminal_id = %terminal_id, + "shutting down terminal runtime before worktree removal" + ); + self.shutdown_terminal_runtime(terminal_id); } } } -- cgit v1.2.3