The branch, hooks has been updated
       via  cd49fe985a9a3099d6939d99953871943022313d (commit)
      from  dab20c103796c657b27351f97b3ca19aaf2d7a76 (commit)

- Log -----------------------------------------------------------------
commit cd49fe985a9a3099d6939d99953871943022313d
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Convert rename-session to use prepare flags
---
 cmd-rename-session.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/cmd-rename-session.c b/cmd-rename-session.c
index 481154c..09b9ce3 100644
--- a/cmd-rename-session.c
+++ b/cmd-rename-session.c
@@ -32,7 +32,7 @@ const struct cmd_entry cmd_rename_session_entry = {
        "rename-session", "rename",
        "t:", 1, 1,
        CMD_TARGET_SESSION_USAGE " new-name",
-       0,
+       CMD_PREP_SESSION_T,
        cmd_rename_session_exec
 };
 
@@ -40,7 +40,7 @@ enum cmd_retval
 cmd_rename_session_exec(struct cmd *self, struct cmd_q *cmdq)
 {
        struct args     *args = self->args;
-       struct session  *s;
+       struct session  *s = cmdq->state.tflag.s;
        const char      *newname;
 
        newname = args->argv[0];
@@ -53,9 +53,6 @@ cmd_rename_session_exec(struct cmd *self, struct cmd_q *cmdq)
                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);
        s->name = xstrdup(newname);


-----------------------------------------------------------------------

Summary of changes:
 cmd-rename-session.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to