diff --git a/cmd-switch-client.c b/cmd-switch-client.c index eff62bca8..204725429 100644 --- a/cmd-switch-client.c +++ b/cmd-switch-client.c @@ -137,7 +137,8 @@ cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item) } else { if (cmdq_get_client(item) == NULL) return (CMD_RETURN_NORMAL); - if (wl != NULL && wp != NULL && wp != wl->window->active) { + if (wl != NULL && wp != NULL && + (wp != wl->window->active || (wp->flags & PANE_HIDDEN))) { w = wl->window; if (w->modal != NULL && wp != w->modal) visible = 1; diff --git a/regress/status-pane-list-click.sh b/regress/status-pane-list-click.sh index db67a8f6a..ec3b51ce3 100644 --- a/regress/status-pane-list-click.sh +++ b/regress/status-pane-list-click.sh @@ -88,5 +88,15 @@ check "$b" '#{pane_hidden_flag}' 0 click $button $row check "$f" '#{pane_hidden_flag}' 0 +# With every pane hidden the active pane is a hidden one; clicking its entry +# must still show it. +$TMUX select-pane -t "$b" || fail "select failed" +for p in "$f" "$a" "$b"; do + $TMUX resize-pane -H -t "$p" || fail "hide failed" +done +check "$b" '#{pane_hidden_flag}:#{pane_active}' '1:1' +click $entry_b $row +check "$b" '#{pane_hidden_flag}:#{pane_active}' '0:1' + cleanup exit 0