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

Diff for /src/usr.bin/tmux/Attic/cmd-next-window.c between version 1.6 and 1.7

version 1.6, 2009/11/13 19:53:29 version 1.7, 2011/01/04 00:42:47
Line 24 
Line 24 
  * Move to next window.   * Move to next window.
  */   */
   
 void    cmd_next_window_init(struct cmd *, int);  void    cmd_next_window_key_binding(struct cmd *, int);
 int     cmd_next_window_exec(struct cmd *, struct cmd_ctx *);  int     cmd_next_window_exec(struct cmd *, struct cmd_ctx *);
   
 const struct cmd_entry cmd_next_window_entry = {  const struct cmd_entry cmd_next_window_entry = {
         "next-window", "next",          "next-window", "next",
           "at:", 0, 0,
         "[-a] " CMD_TARGET_SESSION_USAGE,          "[-a] " CMD_TARGET_SESSION_USAGE,
         0, "a",          0,
         cmd_next_window_init,          cmd_next_window_key_binding,
         cmd_target_parse,          NULL,
         cmd_next_window_exec,          cmd_next_window_exec
         cmd_target_free,  
         cmd_target_print  
 };  };
   
 void  void
 cmd_next_window_init(struct cmd *self, int key)  cmd_next_window_key_binding(struct cmd *self, int key)
 {  {
         struct cmd_target_data  *data;          self->args = args_create(0);
   
         cmd_target_init(self, key);  
         data = self->data;  
   
         if (key == ('n' | KEYC_ESCAPE))          if (key == ('n' | KEYC_ESCAPE))
                 cmd_set_flag(&data->chflags, 'a');                  args_set(self->args, 'a', NULL);
 }  }
   
 int  int
 cmd_next_window_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_next_window_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct cmd_target_data  *data = self->data;          struct args     *args = self->args;
         struct session          *s;          struct session  *s;
         int                      activity;          int              activity;
   
         if ((s = cmd_find_session(ctx, data->target)) == NULL)          if ((s = cmd_find_session(ctx, args_get(args, 't'))) == NULL)
                 return (-1);                  return (-1);
   
         activity = 0;          activity = 0;
         if (cmd_check_flag(data->chflags, 'a'))          if (args_has(self->args, 'a'))
                 activity = 1;                  activity = 1;
   
         if (session_next(s, activity) == 0)          if (session_next(s, activity) == 0)

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7