The branch, hooks has been updated via bbc28abf9dc74b0a6f7ead265c646e9cd7ea299e (commit) via b6d93bc23c37de32cb4cd6e749c39c00a8e5c66a (commit) from 82901f05a7249fb29df380f3b352c2308adff67c (commit)
- Log ----------------------------------------------------------------- commit bbc28abf9dc74b0a6f7ead265c646e9cd7ea299e Author: Thomas Adam <tho...@xteddy.org> Commit: Thomas Adam <tho...@xteddy.org> Convert break-pane to use prepare flags --- cmd-break-pane.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/cmd-break-pane.c b/cmd-break-pane.c index 0025167..aa48a75 100644 --- a/cmd-break-pane.c +++ b/cmd-break-pane.c @@ -34,7 +34,7 @@ const struct cmd_entry cmd_break_pane_entry = { "break-pane", "breakp", "dPF:t:", 0, 0, "[-dP] [-F format] " CMD_TARGET_PANE_USAGE, - 0, + CMD_PREP_PANE_T, cmd_break_pane_exec }; @@ -42,27 +42,23 @@ enum cmd_retval cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; - struct winlink *wl; - struct session *s; - struct window_pane *wp; - struct window *w; + struct winlink *wl = cmdq->state.tflag.wl; + struct session *s = cmdq->state.tflag.s; + struct window_pane *wp = cmdq->state.tflag.wp; + struct window *w = wl->window; char *name; char *cause; int base_idx; - struct client *c; + struct client *c = cmdq->state.c; struct format_tree *ft; const char *template; char *cp; - if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL) - return (CMD_RETURN_ERROR); - if (window_count_panes(wl->window) == 1) { cmdq_error(cmdq, "can't break with only one pane"); return (CMD_RETURN_ERROR); } - w = wl->window; server_unzoom_window(w); TAILQ_REMOVE(&w->panes, wp, entry); @@ -90,8 +86,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq) template = BREAK_PANE_TEMPLATE; ft = format_create(); - if ((c = cmd_find_client(cmdq, NULL, 1)) != NULL) - format_client(ft, c); + format_client(ft, c); format_session(ft, s); format_winlink(ft, s, wl); format_window_pane(ft, wp); commit b6d93bc23c37de32cb4cd6e749c39c00a8e5c66a Author: Thomas Adam <tho...@xteddy.org> Commit: Thomas Adam <tho...@xteddy.org> Convert clear-history to use prepare flags --- cmd-clear-history.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cmd-clear-history.c b/cmd-clear-history.c index e134288..b63b158 100644 --- a/cmd-clear-history.c +++ b/cmd-clear-history.c @@ -30,20 +30,16 @@ const struct cmd_entry cmd_clear_history_entry = { "clear-history", "clearhist", "t:", 0, 0, CMD_TARGET_PANE_USAGE, - 0, + CMD_PREP_PANE_T, cmd_clear_history_exec }; enum cmd_retval -cmd_clear_history_exec(struct cmd *self, struct cmd_q *cmdq) +cmd_clear_history_exec(unused struct cmd *self, struct cmd_q *cmdq) { - struct args *args = self->args; - struct window_pane *wp; struct grid *gd; - if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL) - return (CMD_RETURN_ERROR); - gd = wp->base.grid; + gd = cmdq->state.tflag.wp->base.grid; grid_move_lines(gd, 0, gd->hsize, gd->sy); gd->hsize = 0; ----------------------------------------------------------------------- Summary of changes: cmd-break-pane.c | 19 +++++++------------ cmd-clear-history.c | 10 +++------- 2 files changed, 10 insertions(+), 19 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