feat: add global last-pane navigation

refs #287
This commit is contained in:
Ogulcan Celik
2026-05-26 14:50:13 +03:00
parent 9eec3029e1
commit 57c880f0eb
18 changed files with 527 additions and 103 deletions
+4 -2
View File
@@ -34,6 +34,7 @@ impl App {
let default_shell = self.state.default_shell.clone();
let scrollback_limit_bytes = self.state.pane_scrollback_limit_bytes;
let host_terminal_theme = self.state.host_terminal_theme;
let previous_focus = self.state.current_pane_focus_target();
let Some(ws) = self.state.workspaces.get_mut(ws_idx) else {
return pane_not_found(id, &params.target_pane_id);
};
@@ -57,8 +58,9 @@ impl App {
None => return pane_not_found(id, &params.target_pane_id),
};
if params.focus {
self.state.switch_workspace(ws_idx);
self.state.switch_tab(target_tab_idx);
self.state.switch_workspace_tab(ws_idx, target_tab_idx);
self.state
.record_pane_focus_change(previous_focus, ws_idx, new_pane.pane_id);
self.state.mode = Mode::Terminal;
}
self.terminal_runtimes
+2 -4
View File
@@ -109,8 +109,7 @@ impl App {
}
}
if focus {
self.state.switch_workspace(ws_idx);
self.state.switch_tab(tab_idx);
self.state.switch_workspace_tab(ws_idx, tab_idx);
self.state.mode = Mode::Terminal;
}
self.schedule_session_save();
@@ -142,8 +141,7 @@ impl App {
let Some((ws_idx, tab_idx)) = self.parse_tab_id(&target.tab_id) else {
return tab_not_found(id, &target.tab_id);
};
self.state.switch_workspace(ws_idx);
self.state.switch_tab(tab_idx);
self.state.switch_workspace_tab(ws_idx, tab_idx);
let tab = self.tab_info(ws_idx, tab_idx).unwrap();
encode_success(id, ResponseResult::TabInfo { tab })