summaryrefslogtreecommitdiff
path: root/src/client/shell/endpoint_navigation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shell/endpoint_navigation.rs')
-rw-r--r--src/client/shell/endpoint_navigation.rs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/client/shell/endpoint_navigation.rs b/src/client/shell/endpoint_navigation.rs
index 6cb8c2c4..c15fd434 100644
--- a/src/client/shell/endpoint_navigation.rs
+++ b/src/client/shell/endpoint_navigation.rs
@@ -203,11 +203,23 @@ impl ClientShellState {
_ => unreachable!("endpoint agent navigation"),
};
let target = &agents[next];
- self.focus_or_activate(
+ if self.focus_or_activate(
target.endpoint_id.clone(),
ClientEndpointFocusTarget::Pane(target.pane_id.clone()),
outcome,
- );
+ ) {
+ if target.endpoint_id == self.active_endpoint_id {
+ self.reveal_endpoint_agent(
+ &target.endpoint_id,
+ &target.pane_id,
+ self.hits.agent_body.height,
+ );
+ } else {
+ self.pending_agent_reveal =
+ Some((target.endpoint_id.clone(), target.pane_id.clone()));
+ }
+ outcome.repaint = true;
+ }
return true;
}
false
@@ -218,6 +230,7 @@ impl ClientShellState {
endpoint_id: ClientEndpointId,
outcome: &mut ClientShellInput,
) -> bool {
+ self.pending_agent_reveal = None;
let online = self.endpoint_is_online(&endpoint_id);
if !online && !endpoint_id.is_local() {
let label = self.endpoint_label(&endpoint_id).to_owned();
@@ -242,6 +255,7 @@ impl ClientShellState {
target: ClientEndpointFocusTarget,
outcome: &mut ClientShellInput,
) -> bool {
+ self.pending_agent_reveal = None;
let online = self.endpoint_is_online(&endpoint_id);
if !online && !endpoint_id.is_local() {
let label = self.endpoint_label(&endpoint_id).to_owned();