diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-04-25 18:09:29 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-04-25 18:09:29 +0000 |
commit | fbd7920eebcf32ae5a1d6811877fbd9b115f5ad0 (patch) | |
tree | 6dd8c07659f4b0408625012a3b603afc77f47487 /usr.bin/tmux/cmd-switch-client.c | |
parent | 0fd301d02d7ab56e7f2a9e8c6e49128ff3abc9e7 (diff) |
Move the functions to convert ids from strings into session.c and window.c.
Diffstat (limited to 'usr.bin/tmux/cmd-switch-client.c')
-rw-r--r-- | usr.bin/tmux/cmd-switch-client.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-switch-client.c b/usr.bin/tmux/cmd-switch-client.c index ee29af604cb..ddf3e7f54d8 100644 --- a/usr.bin/tmux/cmd-switch-client.c +++ b/usr.bin/tmux/cmd-switch-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-switch-client.c,v 1.23 2015/04/20 15:34:56 nicm Exp $ */ +/* $OpenBSD: cmd-switch-client.c,v 1.24 2015/04/25 18:09:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); } |