[BACK]Return to session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/session.c between version 1.81 and 1.82

version 1.81, 2018/08/18 20:08:52 version 1.82, 2018/10/18 08:38:01
Line 113 
Line 113 
 /* Create a new session. */  /* Create a new session. */
 struct session *  struct session *
 session_create(const char *prefix, const char *name, int argc, char **argv,  session_create(const char *prefix, const char *name, int argc, char **argv,
     const char *path, const char *cwd, struct environ *env, struct termios *tio,      const char *path, const char *cwd, struct environ *env, struct options *oo,
     int idx, u_int sx, u_int sy, char **cause)      struct termios *tio, int idx, char **cause)
 {  {
         struct session  *s;          struct session  *s;
         struct winlink  *wl;          struct winlink  *wl;
Line 133 
Line 133 
         if (env != NULL)          if (env != NULL)
                 environ_copy(env, s->environ);                  environ_copy(env, s->environ);
   
         s->options = options_create(global_s_options);          s->options = oo;
         s->hooks = hooks_create(global_hooks);          s->hooks = hooks_create(global_hooks);
   
         status_update_saved(s);          status_update_saved(s);
Line 144 
Line 144 
                 memcpy(s->tio, tio, sizeof *s->tio);                  memcpy(s->tio, tio, sizeof *s->tio);
         }          }
   
         s->sx = sx;  
         s->sy = sy;  
   
         if (name != NULL) {          if (name != NULL) {
                 s->name = xstrdup(name);                  s->name = xstrdup(name);
                 s->id = next_session_id++;                  s->id = next_session_id++;
Line 350 
Line 347 
         struct winlink  *wl;          struct winlink  *wl;
         struct environ  *env;          struct environ  *env;
         const char      *shell;          const char      *shell;
         u_int            hlimit;          u_int            hlimit, sx, sy;
   
         if ((wl = winlink_add(&s->windows, idx)) == NULL) {          if ((wl = winlink_add(&s->windows, idx)) == NULL) {
                 xasprintf(cause, "index in use: %d", idx);                  xasprintf(cause, "index in use: %d", idx);
Line 362 
Line 359 
         if (*shell == '\0' || areshell(shell))          if (*shell == '\0' || areshell(shell))
                 shell = _PATH_BSHELL;                  shell = _PATH_BSHELL;
   
           default_window_size(s, NULL, &sx, &sy, -1);
         hlimit = options_get_number(s->options, "history-limit");          hlimit = options_get_number(s->options, "history-limit");
         env = environ_for_session(s, 0);          env = environ_for_session(s, 0);
         w = window_create_spawn(name, argc, argv, path, shell, cwd, env, s->tio,          w = window_create_spawn(name, argc, argv, path, shell, cwd, env, s->tio,
             s->sx, s->sy, hlimit, cause);              sx, sy, hlimit, cause);
         if (w == NULL) {          if (w == NULL) {
                 winlink_remove(&s->windows, wl);                  winlink_remove(&s->windows, wl);
                 environ_free(env);                  environ_free(env);
Line 548 
Line 546 
         s->curw = wl;          s->curw = wl;
         winlink_clear_flags(wl);          winlink_clear_flags(wl);
         window_update_activity(wl->window);          window_update_activity(wl->window);
           tty_update_window_offset(wl->window);
         notify_session("session-window-changed", s);          notify_session("session-window-changed", s);
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82