=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-rename-session.c,v retrieving revision 1.16 retrieving revision 1.17 diff -c -r1.16 -r1.17 *** src/usr.bin/tmux/cmd-rename-session.c 2014/10/20 22:29:25 1.16 --- src/usr.bin/tmux/cmd-rename-session.c 2015/12/13 14:32:38 1.17 *************** *** 1,4 **** ! /* $OpenBSD: cmd-rename-session.c,v 1.16 2014/10/20 22:29:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-rename-session.c,v 1.17 2015/12/13 14:32:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 32,38 **** "rename-session", "rename", "t:", 1, 1, CMD_TARGET_SESSION_USAGE " new-name", ! 0, cmd_rename_session_exec }; --- 32,38 ---- "rename-session", "rename", "t:", 1, 1, CMD_TARGET_SESSION_USAGE " new-name", ! CMD_SESSION_T, cmd_rename_session_exec }; *************** *** 40,46 **** cmd_rename_session_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; ! struct session *s; const char *newname; newname = args->argv[0]; --- 40,46 ---- cmd_rename_session_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; ! struct session *s = cmdq->state.tflag.s; const char *newname; newname = args->argv[0]; *************** *** 52,60 **** cmdq_error(cmdq, "duplicate session: %s", newname); return (CMD_RETURN_ERROR); } - - if ((s = cmd_find_session(cmdq, args_get(args, 't'), 0)) == NULL) - return (CMD_RETURN_ERROR); RB_REMOVE(sessions, &sessions, s); free(s->name); --- 52,57 ----