diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-26 14:48:57 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-26 14:50:13 +0300 |
| commit | 57c880f0ebaa5011abc90f4e2fd4f84fc072ce35 (patch) | |
| tree | 9f662b19cec2e9c9e50e87eb5e96def9e8ae9822 /src/app/input/mod.rs | |
| parent | 9eec3029e13b791b8a4954e38d5bb7db6e2ff68f (diff) | |
feat: add global last-pane navigation
refs #287
Diffstat (limited to 'src/app/input/mod.rs')
| -rw-r--r-- | src/app/input/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/app/input/mod.rs b/src/app/input/mod.rs index 0f0b3568..e145e628 100644 --- a/src/app/input/mod.rs +++ b/src/app/input/mod.rs @@ -367,7 +367,11 @@ impl AppState { follow_cwd, )); - if let Some(ws) = self.active.and_then(|i| self.workspaces.get_mut(i)) { + let previous_focus = self.current_pane_focus_target(); + if let Some(ws_idx) = self.active { + let Some(ws) = self.workspaces.get_mut(ws_idx) else { + return; + }; if let Ok(new_pane) = ws.split_focused( direction, new_rows, @@ -381,7 +385,7 @@ impl AppState { terminal_runtimes.insert(new_pane.terminal.id.clone(), new_pane.runtime); self.terminals .insert(new_pane.terminal.id.clone(), new_pane.terminal); - ws.layout.focus_pane(new_id); + self.record_pane_focus_change(previous_focus, ws_idx, new_id); self.mark_session_dirty(); self.mode = Mode::Terminal; } |
