diff options
author | 2015-04-25 18:09:28 +0000 | |
---|---|---|
committer | 2015-04-25 18:09:28 +0000 | |
commit | 3b2ac4f9d31b028c037b08b09465c6477a09689c (patch) | |
tree | c4bf975e599631a9c1e14f3e9f168148fb1a44e8 /usr.bin/tmux/cmd-attach-session.c | |
parent | double word fix; from david vasek (diff) | |
download | wireguard-openbsd-3b2ac4f9d31b028c037b08b09465c6477a09689c.tar.xz wireguard-openbsd-3b2ac4f9d31b028c037b08b09465c6477a09689c.zip |
Move the functions to convert ids from strings into session.c and window.c.
Diffstat (limited to 'usr.bin/tmux/cmd-attach-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-attach-session.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c index 4d6438efac9..7117021f310 100644 --- a/usr.bin/tmux/cmd-attach-session.c +++ b/usr.bin/tmux/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-attach-session.c,v 1.33 2015/04/24 23:17:11 nicm Exp $ */ +/* $OpenBSD: cmd-attach-session.c,v 1.34 2015/04/25 18:09:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -69,9 +69,12 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag, } 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); } |