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

Diff for /src/usr.bin/tmux/cmd-respawn-window.c between version 1.5 and 1.6

version 1.5, 2009/07/26 12:58:44 version 1.6, 2009/08/08 21:52:43
Line 47 
Line 47 
         struct window           *w;          struct window           *w;
         struct window_pane      *wp;          struct window_pane      *wp;
         struct session          *s;          struct session          *s;
         const char             **env;          struct environ           env;
         char                    *cause;          char                    *cause;
   
         if ((wl = cmd_find_window(ctx, data->target, &s)) == NULL)          if ((wl = cmd_find_window(ctx, data->target, &s)) == NULL)
Line 64 
Line 64 
                 }                  }
         }          }
   
         env = server_fill_environ(s);          environ_init(&env);
           environ_copy(&global_environ, &env);
           environ_copy(&s->environ, &env);
           server_fill_environ(s, &env);
   
         wp = TAILQ_FIRST(&w->panes);          wp = TAILQ_FIRST(&w->panes);
         TAILQ_REMOVE(&w->panes, wp, entry);          TAILQ_REMOVE(&w->panes, wp, entry);
Line 72 
Line 75 
         window_destroy_panes(w);          window_destroy_panes(w);
         TAILQ_INSERT_HEAD(&w->panes, wp, entry);          TAILQ_INSERT_HEAD(&w->panes, wp, entry);
         window_pane_resize(wp, w->sx, w->sy);          window_pane_resize(wp, w->sx, w->sy);
         if (window_pane_spawn(wp, data->arg, NULL, env, &cause) != 0) {          if (window_pane_spawn(wp, data->arg, NULL, &env, &cause) != 0) {
                 ctx->error(ctx, "respawn window failed: %s", cause);                  ctx->error(ctx, "respawn window failed: %s", cause);
                 xfree(cause);                  xfree(cause);
                   environ_free(&env);
                 return (-1);                  return (-1);
         }          }
         layout_init(w);          layout_init(w);
Line 84 
Line 88 
         recalculate_sizes();          recalculate_sizes();
         server_redraw_window(w);          server_redraw_window(w);
   
           environ_free(&env);
         return (0);          return (0);
 }  }

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