mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 01:18:52 +00:00
Do not do a search for the tty path if there isn't one.
This commit is contained in:
parent
094a047ddf
commit
14d8cd6445
@ -243,10 +243,13 @@ cmd_find_current_session_with_client(struct cmd_find_state *fs)
|
|||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
|
|
||||||
/* If this is running in a pane, that's great. */
|
/* If this is running in a pane, that's great. */
|
||||||
|
if (fs->cmdq->client->tty.path != NULL) {
|
||||||
RB_FOREACH(wp, window_pane_tree, &all_window_panes) {
|
RB_FOREACH(wp, window_pane_tree, &all_window_panes) {
|
||||||
if (strcmp(wp->tty, fs->cmdq->client->tty.path) == 0)
|
if (strcmp(wp->tty, fs->cmdq->client->tty.path) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
wp = NULL;
|
||||||
|
|
||||||
/* Not running in a pane. We know nothing. Find the best session. */
|
/* Not running in a pane. We know nothing. Find the best session. */
|
||||||
if (wp == NULL) {
|
if (wp == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user