The branch, hooks has been updated
       via  047fa29dd04623c1ebc892aa7db426839e26ecdd (commit)
      from  902dcc00a83eacf034be2c3059f177678b6f56d7 (commit)

- Log -----------------------------------------------------------------
commit 047fa29dd04623c1ebc892aa7db426839e26ecdd
Author: Thomas Adam <[email protected]>
Commit: Thomas Adam <[email protected]>

    movew: Make -r local to cmd_move_window_entry
    
    The args_has(args, 'r') check applied to both movew/linkw, despite only
    movew having -r in its getopts section.  Move this into the check for
    cmd_move_window_entry instead, thus meaning that it won't clobber linkw if
    that ever uses -r for anything.
---
 cmd-move-window.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/cmd-move-window.c b/cmd-move-window.c
index 3064cd6..75a4c0c 100644
--- a/cmd-move-window.c
+++ b/cmd-move-window.c
@@ -53,17 +53,6 @@ cmd_move_window_exec(struct cmd *self, struct cmd_q *cmdq)
        char            *cause;
        int              idx, kflag, dflag;
 
-       if (args_has(args, 'r')) {
-               s = cmd_find_session(cmdq, args_get(args, 't'), 0);
-               if (s == NULL)
-                       return (CMD_RETURN_ERROR);
-
-               session_renumber_windows(s);
-               recalculate_sizes();
-
-               return (CMD_RETURN_NORMAL);
-       }
-
        if ((wl = cmd_find_window(cmdq, args_get(args, 's'), &src)) == NULL)
                return (CMD_RETURN_ERROR);
        if ((idx = cmd_find_index(cmdq, args_get(args, 't'), &dst)) == -2)
@@ -77,8 +66,19 @@ cmd_move_window_exec(struct cmd *self, struct cmd_q *cmdq)
                free(cause);
                return (CMD_RETURN_ERROR);
        }
-       if (self->entry == &cmd_move_window_entry)
+       if (self->entry == &cmd_move_window_entry) {
+               if (args_has(args, 'r')) {
+                       s = cmd_find_session(cmdq, args_get(args, 't'), 0);
+                       if (s == NULL)
+                               return (CMD_RETURN_ERROR);
+
+                       session_renumber_windows(s);
+                       recalculate_sizes();
+
+                       return (CMD_RETURN_NORMAL);
+               }
                server_unlink_window(src, wl);
+       }
        recalculate_sizes();
 
        return (CMD_RETURN_NORMAL);


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

Summary of changes:
 cmd-move-window.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to