[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.7 and 1.8

version 1.7, 2009/07/26 12:58:44 version 1.8, 2009/08/08 21:52:43
Line 149 
Line 149 
         struct winlink                  *wl;          struct winlink                  *wl;
         struct window                   *w;          struct window                   *w;
         struct window_pane              *wp;          struct window_pane              *wp;
         const char                     **env;          struct environ                   env;
         char                            *cmd, *cwd, *cause;          char                            *cmd, *cwd, *cause;
         u_int                            hlimit;          u_int                            hlimit;
         int                              size;          int                              size;
Line 159 
Line 159 
                 return (-1);                  return (-1);
         w = wl->window;          w = wl->window;
   
         env = server_fill_environ(s);          environ_init(&env);
           environ_copy(&global_environ, &env);
           environ_copy(&s->environ, &env);
           server_fill_environ(s, &env);
   
         cmd = data->cmd;          cmd = data->cmd;
         if (cmd == NULL)          if (cmd == NULL)
Line 181 
Line 184 
                 type = LAYOUT_LEFTRIGHT;                  type = LAYOUT_LEFTRIGHT;
   
         wp = window_add_pane(w, hlimit);          wp = window_add_pane(w, hlimit);
         if (window_pane_spawn(wp, cmd, cwd, env, &cause) != 0)          if (window_pane_spawn(wp, cmd, cwd, &env, &cause) != 0)
                 goto error;                  goto error;
         if (layout_split_pane(w->active, type, size, wp) != 0) {          if (layout_split_pane(w->active, type, size, wp) != 0) {
                 cause = xstrdup("pane too small");                  cause = xstrdup("pane too small");
Line 197 
Line 200 
         } else          } else
                 server_status_session(s);                  server_status_session(s);
   
           environ_free(&env);
         return (0);          return (0);
   
 error:  error:
           environ_free(&env);
         if (wp != NULL)          if (wp != NULL)
                 window_remove_pane(w, wp);                  window_remove_pane(w, wp);
         ctx->error(ctx, "create pane failed: %s", cause);          ctx->error(ctx, "create pane failed: %s", cause);

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