[BACK]Return to cmd-swap-window.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-swap-window.c between version 1.8 and 1.9

version 1.8, 2012/10/15 21:53:30 version 1.9, 2013/03/24 09:54:10
Line 26 
Line 26 
  * Swap one window with another.   * Swap one window with another.
  */   */
   
 enum cmd_retval cmd_swap_window_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval cmd_swap_window_exec(struct cmd *, struct cmd_q *);
   
 const struct cmd_entry cmd_swap_window_entry = {  const struct cmd_entry cmd_swap_window_entry = {
         "swap-window", "swapw",          "swap-window", "swapw",
Line 39 
Line 39 
 };  };
   
 enum cmd_retval  enum cmd_retval
 cmd_swap_window_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_swap_window_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         const char              *target_src, *target_dst;          const char              *target_src, *target_dst;
Line 49 
Line 49 
         struct window           *w;          struct window           *w;
   
         target_src = args_get(args, 's');          target_src = args_get(args, 's');
         if ((wl_src = cmd_find_window(ctx, target_src, &src)) == NULL)          if ((wl_src = cmd_find_window(cmdq, target_src, &src)) == NULL)
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         target_dst = args_get(args, 't');          target_dst = args_get(args, 't');
         if ((wl_dst = cmd_find_window(ctx, target_dst, &dst)) == NULL)          if ((wl_dst = cmd_find_window(cmdq, target_dst, &dst)) == NULL)
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
   
         sg_src = session_group_find(src);          sg_src = session_group_find(src);
         sg_dst = session_group_find(dst);          sg_dst = session_group_find(dst);
         if (src != dst &&          if (src != dst &&
             sg_src != NULL && sg_dst != NULL && sg_src == sg_dst) {              sg_src != NULL && sg_dst != NULL && sg_src == sg_dst) {
                 ctx->error(ctx, "can't move window, sessions are grouped");                  cmdq_error(cmdq, "can't move window, sessions are grouped");
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9