The branch, hooks has been updated via 29d5325a4565f255fcfc74edd420d6f252e1ff5f (commit) via cf0891a1cefa1edfa6a3e03c02c39c0027357a2e (commit) via 015e1612b288795f740f256f76d4fb1121a3f4a4 (commit) from 7f9bcb1dcac142e47867a317c9070d91f6930ca1 (commit)
- Log ----------------------------------------------------------------- commit 29d5325a4565f255fcfc74edd420d6f252e1ff5f Author: Thomas Adam <tho...@xteddy.org> Commit: Thomas Adam <tho...@xteddy.org> Convert split-window to use prepare flags --- cmd-split-window.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cmd-split-window.c b/cmd-split-window.c index 6b90125..6839d78 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -39,7 +39,7 @@ const struct cmd_entry cmd_split_window_entry = { "bc:dF:l:hp:Pt:v", 0, -1, "[-bdhvP] [-c start-directory] [-F format] [-p percentage|-l size] " CMD_TARGET_PANE_USAGE " [command]", - 0, + CMD_PREP_PANE_T, cmd_split_window_exec }; @@ -47,10 +47,10 @@ enum cmd_retval cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; - struct session *s; - struct winlink *wl; - struct window *w; - struct window_pane *wp, *new_wp = NULL; + struct session *s = cmdq->state.tflag.s; + struct winlink *wl = cmdq->state.tflag.wl; + struct window *w = wl->window; + struct window_pane *wp = cmdq->state.tflag.wp, *new_wp = NULL; struct environ env; const char *cmd, *path, *shell, *template; char **argv, *cause, *new_cause, *cp; @@ -62,9 +62,6 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq) struct format_tree *ft; struct environ_entry *envent; - if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL) - return (CMD_RETURN_ERROR); - w = wl->window; server_unzoom_window(w); environ_init(&env); commit cf0891a1cefa1edfa6a3e03c02c39c0027357a2e Author: Thomas Adam <tho...@xteddy.org> Commit: Thomas Adam <tho...@xteddy.org> Convert rotate-window to use prepare flags --- cmd-rotate-window.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cmd-rotate-window.c b/cmd-rotate-window.c index 859ff04..f8ebfee 100644 --- a/cmd-rotate-window.c +++ b/cmd-rotate-window.c @@ -30,24 +30,19 @@ const struct cmd_entry cmd_rotate_window_entry = { "rotate-window", "rotatew", "Dt:U", 0, 0, "[-DU] " CMD_TARGET_WINDOW_USAGE, - 0, + CMD_PREP_WINDOW_T, cmd_rotate_window_exec }; enum cmd_retval cmd_rotate_window_exec(struct cmd *self, struct cmd_q *cmdq) { - struct args *args = self->args; - struct winlink *wl; - struct window *w; + struct winlink *wl = cmdq->state.tflag.wl; + struct window *w = wl->window; struct window_pane *wp, *wp2; struct layout_cell *lc; u_int sx, sy, xoff, yoff; - if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL) - return (CMD_RETURN_ERROR); - w = wl->window; - if (args_has(self->args, 'D')) { wp = TAILQ_LAST(&w->panes, window_panes); TAILQ_REMOVE(&w->panes, wp, entry); commit 015e1612b288795f740f256f76d4fb1121a3f4a4 Author: Thomas Adam <tho...@xteddy.org> Commit: Thomas Adam <tho...@xteddy.org> Convert respawn-pane to use prepare flags --- cmd-respawn-pane.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/cmd-respawn-pane.c b/cmd-respawn-pane.c index 4703153..d10d5dc 100644 --- a/cmd-respawn-pane.c +++ b/cmd-respawn-pane.c @@ -34,7 +34,7 @@ const struct cmd_entry cmd_respawn_pane_entry = { "respawn-pane", "respawnp", "kt:", 0, -1, "[-k] " CMD_TARGET_PANE_USAGE " [command]", - 0, + CMD_PREP_PANE_T, cmd_respawn_pane_exec }; @@ -42,20 +42,16 @@ enum cmd_retval cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; - struct winlink *wl; - struct window *w; - struct window_pane *wp; - struct session *s; + struct winlink *wl = cmdq->state.tflag.wl; + struct window *w = wl->window; + struct window_pane *wp = cmdq->state.tflag.wp; + struct session *s = cmdq->state.tflag.s; struct environ env; const char *path; char *cause; u_int idx; struct environ_entry *envent; - if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL) - return (CMD_RETURN_ERROR); - w = wl->window; - if (!args_has(self->args, 'k') && wp->fd != -1) { if (window_pane_index(wp, &idx) != 0) fatalx("index not found"); ----------------------------------------------------------------------- Summary of changes: cmd-respawn-pane.c | 14 +++++--------- cmd-rotate-window.c | 11 +++-------- cmd-split-window.c | 13 +++++-------- 3 files changed, 13 insertions(+), 25 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