[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.79 and 1.80

version 1.79, 2017/03/08 13:36:12 version 1.80, 2017/03/09 17:02:38
Line 71 
Line 71 
   
         server_unzoom_window(w);          server_unzoom_window(w);
   
         env = environ_create();  
         environ_copy(global_environ, env);  
         environ_copy(s->environ, env);  
         server_fill_environ(s, env);  
   
         if (args->argc == 0) {          if (args->argc == 0) {
                 cmd = options_get_string(s->options, "default-command");                  cmd = options_get_string(s->options, "default-command");
                 if (cmd != NULL && *cmd != '\0') {                  if (cmd != NULL && *cmd != '\0') {
Line 148 
Line 143 
         if (envent != NULL)          if (envent != NULL)
                 path = envent->value;                  path = envent->value;
   
           env = environ_for_session(s);
         if (window_pane_spawn(new_wp, argc, argv, path, shell, cwd, env,          if (window_pane_spawn(new_wp, argc, argv, path, shell, cwd, env,
             s->tio, &cause) != 0)              s->tio, &cause) != 0) {
                   environ_free(env);
                 goto error;                  goto error;
           }
           environ_free(env);
   
         server_redraw_window(w);          server_redraw_window(w);
   
Line 161 
Line 160 
         } else          } else
                 server_status_session(s);                  server_status_session(s);
   
         environ_free(env);  
   
         if (args_has(args, 'P')) {          if (args_has(args, 'P')) {
                 if ((template = args_get(args, 'F')) == NULL)                  if ((template = args_get(args, 'F')) == NULL)
                         template = SPLIT_WINDOW_TEMPLATE;                          template = SPLIT_WINDOW_TEMPLATE;
Line 186 
Line 183 
         return (CMD_RETURN_NORMAL);          return (CMD_RETURN_NORMAL);
   
 error:  error:
         environ_free(env);  
         if (new_wp != NULL) {          if (new_wp != NULL) {
                 layout_close_pane(new_wp);                  layout_close_pane(new_wp);
                 window_remove_pane(w, new_wp);                  window_remove_pane(w, new_wp);

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.80