The branch, hooks has been updated
       via  5d86a369be23403d0ed5c3a68b687e12d8a2979a (commit)
       via  5ef84e4b316151802a326080c0a0d790458ee3bd (commit)
       via  bcc8a621a02a5fd7a5fd6ac4005d678c6c7acf30 (commit)
      from  389c2c37149c50c863ccefd7028bc07a7d53dfab (commit)

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

    Convert resize-pane to use prepare flags
---
 cmd-resize-pane.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/cmd-resize-pane.c b/cmd-resize-pane.c
index 42f0f39..30f4d71 100644
--- a/cmd-resize-pane.c
+++ b/cmd-resize-pane.c
@@ -32,7 +32,7 @@ const struct cmd_entry cmd_resize_pane_entry = {
        "resize-pane", "resizep",
        "DLRt:Ux:y:Z", 0, 1,
        "[-DLRUZ] [-x width] [-y height] " CMD_TARGET_PANE_USAGE " 
[adjustment]",
-       0,
+       CMD_PREP_PANE_T,
        cmd_resize_pane_exec
 };
 
@@ -40,18 +40,14 @@ enum cmd_retval
 cmd_resize_pane_exec(struct cmd *self, struct cmd_q *cmdq)
 {
        struct args             *args = self->args;
-       struct winlink          *wl;
-       struct window           *w;
+       struct window_pane      *wp = cmdq->state.tflag.wp;
+       struct winlink          *wl = cmdq->state.tflag.wl;
+       struct window           *w = wl->window;
        const char              *errstr;
        char                    *cause;
-       struct window_pane      *wp;
        u_int                    adjust;
        int                      x, y;
 
-       if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp)) == NULL)
-               return (CMD_RETURN_ERROR);
-       w = wl->window;
-
        if (args_has(args, 'Z')) {
                if (w->flags & WINDOW_ZOOMED)
                        window_unzoom(w);


commit 5ef84e4b316151802a326080c0a0d790458ee3bd
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Convert {select,next,previous}-layout to use prepare flags
---
 cmd-select-layout.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/cmd-select-layout.c b/cmd-select-layout.c
index 77137b7..9ba6de3 100644
--- a/cmd-select-layout.c
+++ b/cmd-select-layout.c
@@ -30,7 +30,7 @@ const struct cmd_entry cmd_select_layout_entry = {
        "select-layout", "selectl",
        "npt:", 0, 1,
        "[-np] " CMD_TARGET_WINDOW_USAGE " [layout-name]",
-       0,
+       CMD_PREP_WINDOW_T,
        cmd_select_layout_exec
 };
 
@@ -38,7 +38,7 @@ const struct cmd_entry cmd_next_layout_entry = {
        "next-layout", "nextl",
        "t:", 0, 0,
        CMD_TARGET_WINDOW_USAGE,
-       0,
+       CMD_PREP_WINDOW_T,
        cmd_select_layout_exec
 };
 
@@ -46,7 +46,7 @@ const struct cmd_entry cmd_previous_layout_entry = {
        "previous-layout", "prevl",
        "t:", 0, 0,
        CMD_TARGET_WINDOW_USAGE,
-       0,
+       CMD_PREP_WINDOW_T,
        cmd_select_layout_exec
 };
 
@@ -54,12 +54,10 @@ enum cmd_retval
 cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq)
 {
        struct args     *args = self->args;
-       struct winlink  *wl;
+       struct winlink  *wl = cmdq->state.tflag.wl;
        const char      *layoutname;
        int              next, previous, layout;
 
-       if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL)
-               return (CMD_RETURN_ERROR);
        server_unzoom_window(wl->window);
 
        next = self->entry == &cmd_next_layout_entry;


commit bcc8a621a02a5fd7a5fd6ac4005d678c6c7acf30
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Convert pipe-pane to use prepare flags
---
 cmd-pipe-pane.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/cmd-pipe-pane.c b/cmd-pipe-pane.c
index 4ab1824..513af72 100644
--- a/cmd-pipe-pane.c
+++ b/cmd-pipe-pane.c
@@ -39,7 +39,7 @@ const struct cmd_entry cmd_pipe_pane_entry = {
        "pipe-pane", "pipep",
        "ot:", 0, 1,
        "[-o] " CMD_TARGET_PANE_USAGE " [command]",
-       0,
+       CMD_PREP_PANE_T,
        cmd_pipe_pane_exec
 };
 
@@ -47,15 +47,11 @@ enum cmd_retval
 cmd_pipe_pane_exec(struct cmd *self, struct cmd_q *cmdq)
 {
        struct args             *args = self->args;
-       struct client           *c;
-       struct window_pane      *wp;
+       struct client           *c = cmdq->state.c;
+       struct window_pane      *wp = cmdq->state.tflag.wp;
        char                    *command;
        int                      old_fd, pipe_fd[2], null_fd;
 
-       if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL)
-               return (CMD_RETURN_ERROR);
-       c = cmd_find_client(cmdq, NULL, 1);
-
        /* Destroy the old pipe. */
        old_fd = wp->pipe_fd;
        if (wp->pipe_fd != -1) {


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

Summary of changes:
 cmd-pipe-pane.c     |   10 +++-------
 cmd-resize-pane.c   |   12 ++++--------
 cmd-select-layout.c |   10 ++++------
 3 files changed, 11 insertions(+), 21 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