mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Move the functions to convert ids from strings into session.c and window.c.
This commit is contained in:
parent
d23af6cca0
commit
6dbd63ba4f
6 changed files with 67 additions and 64 deletions
|
|
@ -99,10 +99,12 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
} else {
|
||||
if ((s = cmd_find_session(cmdq, tflag, 1)) == NULL)
|
||||
return (CMD_RETURN_ERROR);
|
||||
w = cmd_lookup_windowid(tflag);
|
||||
if (w == NULL &&
|
||||
(wp = cmd_lookup_paneid(tflag)) != NULL)
|
||||
w = wp->window;
|
||||
w = window_find_by_id_str(tflag);
|
||||
if (w == NULL) {
|
||||
wp = window_pane_find_by_id_str(tflag);
|
||||
if (wp != NULL)
|
||||
w = wp->window;
|
||||
}
|
||||
if (w != NULL)
|
||||
wl = winlink_find_by_window(&s->windows, w);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue