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

Diff for /src/usr.bin/tmux/cmd-select-pane.c between version 1.13 and 1.14

version 1.13, 2011/01/31 20:54:42 version 1.14, 2012/07/11 07:10:15
Line 24 
Line 24 
  * Select pane.   * Select pane.
  */   */
   
 void    cmd_select_pane_key_binding(struct cmd *, int);  void             cmd_select_pane_key_binding(struct cmd *, int);
 int     cmd_select_pane_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_select_pane_exec(struct cmd *, struct cmd_ctx *);
   
 const struct cmd_entry cmd_select_pane_entry = {  const struct cmd_entry cmd_select_pane_entry = {
         "select-pane", "selectp",          "select-pane", "selectp",
Line 63 
Line 63 
                 args_set(self->args, 't', ":.+");                  args_set(self->args, 't', ":.+");
 }  }
   
 int  enum cmd_retval
 cmd_select_pane_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_select_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
Line 73 
Line 73 
         if (self->entry == &cmd_last_pane_entry || args_has(args, 'l')) {          if (self->entry == &cmd_last_pane_entry || args_has(args, 'l')) {
                 wl = cmd_find_window(ctx, args_get(args, 't'), NULL);                  wl = cmd_find_window(ctx, args_get(args, 't'), NULL);
                 if (wl == NULL)                  if (wl == NULL)
                         return (-1);                          return (CMD_RETURN_ERROR);
   
                 if (wl->window->last == NULL) {                  if (wl->window->last == NULL) {
                         ctx->error(ctx, "no last pane");                          ctx->error(ctx, "no last pane");
                         return (-1);                          return (CMD_RETURN_ERROR);
                 }                  }
   
                 window_set_active_pane(wl->window, wl->window->last);                  window_set_active_pane(wl->window, wl->window->last);
                 server_status_window(wl->window);                  server_status_window(wl->window);
                 server_redraw_window_borders(wl->window);                  server_redraw_window_borders(wl->window);
   
                 return (0);                  return (CMD_RETURN_NORMAL);
         }          }
   
         if ((wl = cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp)) == NULL)          if ((wl = cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp)) == NULL)
                 return (-1);                  return (CMD_RETURN_ERROR);
   
         if (!window_pane_visible(wp)) {          if (!window_pane_visible(wp)) {
                 ctx->error(ctx, "pane not visible");                  ctx->error(ctx, "pane not visible");
                 return (-1);                  return (CMD_RETURN_ERROR);
         }          }
   
         if (args_has(self->args, 'L'))          if (args_has(self->args, 'L'))
Line 105 
Line 105 
                 wp = window_pane_find_down(wp);                  wp = window_pane_find_down(wp);
         if (wp == NULL) {          if (wp == NULL) {
                 ctx->error(ctx, "pane not found");                  ctx->error(ctx, "pane not found");
                 return (-1);                  return (CMD_RETURN_ERROR);
         }          }
   
         window_set_active_pane(wl->window, wp);          window_set_active_pane(wl->window, wp);
         server_status_window(wl->window);          server_status_window(wl->window);
         server_redraw_window_borders(wl->window);          server_redraw_window_borders(wl->window);
   
         return (0);          return (CMD_RETURN_NORMAL);
 }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14