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

Diff for /src/usr.bin/tmux/cmd-find-window.c between version 1.16 and 1.17

version 1.16, 2012/07/10 11:53:01 version 1.17, 2012/07/11 07:10:15
Line 28 
Line 28 
  * Find window containing text.   * Find window containing text.
  */   */
   
 int     cmd_find_window_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_find_window_exec(struct cmd *, struct cmd_ctx *);
   
 u_int   cmd_find_window_match_flags(struct args *);  u_int   cmd_find_window_match_flags(struct args *);
 void    cmd_find_window_callback(struct window_choose_data *);  void    cmd_find_window_callback(struct window_choose_data *);
Line 74 
Line 74 
         return (match_flags);          return (match_flags);
 }  }
   
 int  enum cmd_retval
 cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct args                     *args = self->args;          struct args                     *args = self->args;
Line 90 
Line 90 
   
         if (ctx->curclient == NULL) {          if (ctx->curclient == NULL) {
                 ctx->error(ctx, "must be run interactively");                  ctx->error(ctx, "must be run interactively");
                 return (-1);                  return (CMD_RETURN_ERROR);
         }          }
         s = ctx->curclient->session;          s = ctx->curclient->session;
   
         if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)          if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)
                 return (-1);                  return (CMD_RETURN_ERROR);
   
         if ((template = args_get(args, 'F')) == NULL)          if ((template = args_get(args, 'F')) == NULL)
                 template = DEFAULT_FIND_WINDOW_TEMPLATE;                  template = DEFAULT_FIND_WINDOW_TEMPLATE;
Line 150 
Line 150 
                 ctx->error(ctx, "no windows matching: %s", str);                  ctx->error(ctx, "no windows matching: %s", str);
                 ARRAY_FREE(&list_idx);                  ARRAY_FREE(&list_idx);
                 ARRAY_FREE(&list_ctx);                  ARRAY_FREE(&list_ctx);
                 return (-1);                  return (CMD_RETURN_ERROR);
         }          }
   
         if (ARRAY_LENGTH(&list_idx) == 1) {          if (ARRAY_LENGTH(&list_idx) == 1) {
Line 189 
Line 189 
         ARRAY_FREE(&list_idx);          ARRAY_FREE(&list_idx);
         ARRAY_FREE(&list_ctx);          ARRAY_FREE(&list_ctx);
   
         return (0);          return (CMD_RETURN_NORMAL);
 }  }
   
 void  void

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17