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

Diff for /src/usr.bin/tmux/cmd-split-window.c between version 1.34 and 1.35

version 1.34, 2012/07/10 11:53:01 version 1.35, 2012/07/11 07:10:15
Line 28 
Line 28 
  * Split a window (add a new pane).   * Split a window (add a new pane).
  */   */
   
 void    cmd_split_window_key_binding(struct cmd *, int);  void             cmd_split_window_key_binding(struct cmd *, int);
 int     cmd_split_window_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_split_window_exec(struct cmd *, struct cmd_ctx *);
   
 const struct cmd_entry cmd_split_window_entry = {  const struct cmd_entry cmd_split_window_entry = {
         "split-window", "splitw",          "split-window", "splitw",
Line 50 
Line 50 
                 args_set(self->args, 'h', NULL);                  args_set(self->args, 'h', NULL);
 }  }
   
 int  enum cmd_retval
 cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
Line 71 
Line 71 
         char                    *cp;          char                    *cp;
   
         if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL)          if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL)
                 return (-1);                  return (CMD_RETURN_ERROR);
         w = wl->window;          w = wl->window;
   
         environ_init(&env);          environ_init(&env);
Line 156 
Line 156 
                 format_free(ft);                  format_free(ft);
         }          }
         notify_window_layout_changed(w);          notify_window_layout_changed(w);
         return (0);          return (CMD_RETURN_NORMAL);
   
 error:  error:
         environ_free(&env);          environ_free(&env);
Line 164 
Line 164 
                 window_remove_pane(w, new_wp);                  window_remove_pane(w, new_wp);
         ctx->error(ctx, "create pane failed: %s", cause);          ctx->error(ctx, "create pane failed: %s", cause);
         free(cause);          free(cause);
         return (-1);          return (CMD_RETURN_ERROR);
 }  }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35