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

Diff for /src/usr.bin/tmux/cmd-new-window.c between version 1.90 and 1.91

version 1.90, 2021/02/05 12:23:49 version 1.91, 2021/08/20 18:59:53
Line 62 
Line 62 
         int                      idx = target->idx, before;          int                      idx = target->idx, before;
         struct winlink          *new_wl = NULL;          struct winlink          *new_wl = NULL;
         char                    *cause = NULL, *cp;          char                    *cause = NULL, *cp;
         const char              *template, *add, *name;          const char              *template, *name;
         struct cmd_find_state    fs;          struct cmd_find_state    fs;
         struct args_value       *value;          struct args_value       *av;
   
         /*          /*
          * If -S and -n are given and -t is not and a single window with this           * If -S and -n are given and -t is not and a single window with this
Line 112 
Line 112 
         sc.argv = args->argv;          sc.argv = args->argv;
         sc.environ = environ_create();          sc.environ = environ_create();
   
         add = args_first_value(args, 'e', &value);          av = args_first_value(args, 'e');
         while (add != NULL) {          while (av != NULL) {
                 environ_put(sc.environ, add, 0);                  environ_put(sc.environ, av->value, 0);
                 add = args_next_value(&value);                  av = args_next_value(av);
         }          }
   
         sc.idx = idx;          sc.idx = idx;
Line 130 
Line 130 
         if ((new_wl = spawn_window(&sc, &cause)) == NULL) {          if ((new_wl = spawn_window(&sc, &cause)) == NULL) {
                 cmdq_error(item, "create window failed: %s", cause);                  cmdq_error(item, "create window failed: %s", cause);
                 free(cause);                  free(cause);
                   environ_free(sc.environ);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
         if (!args_has(args, 'd') || new_wl == s->curw) {          if (!args_has(args, 'd') || new_wl == s->curw) {

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91