From 6dbd63ba4f2da666d55267692c610b9ed8d1d8dd Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 25 Apr 2015 18:09:28 +0000 Subject: Move the functions to convert ids from strings into session.c and window.c. --- cmd-attach-session.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cmd-attach-session.c') diff --git a/cmd-attach-session.c b/cmd-attach-session.c index 79e14616..46d568b4 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -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); } -- cgit v1.2.3