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

Diff for /src/usr.bin/tmux/spawn.c between version 1.19 and 1.20

version 1.19, 2020/03/31 17:14:40 version 1.20, 2020/04/13 10:59:59
Line 56 
Line 56 
         struct session          *s = sc->s;          struct session          *s = sc->s;
         struct winlink          *wl = sc->wl;          struct winlink          *wl = sc->wl;
         struct window_pane      *wp0 = sc->wp0;          struct window_pane      *wp0 = sc->wp0;
           const char              *name = cmdq_get_name(sc->item);
         char                     tmp[128];          char                     tmp[128];
         const char              *name;  
   
         log_debug("%s: %s, flags=%#x", from, sc->item->name, sc->flags);          log_debug("%s: %s, flags=%#x", from, name, sc->flags);
   
         if (wl != NULL && wp0 != NULL)          if (wl != NULL && wp0 != NULL)
                 xsnprintf(tmp, sizeof tmp, "wl=%d wp0=%%%u", wl->idx, wp0->id);                  xsnprintf(tmp, sizeof tmp, "wl=%d wp0=%%%u", wl->idx, wp0->id);
Line 70 
Line 70 
         else          else
                 xsnprintf(tmp, sizeof tmp, "wl=none wp0=none");                  xsnprintf(tmp, sizeof tmp, "wl=none wp0=none");
         log_debug("%s: s=$%u %s idx=%d", from, s->id, tmp, sc->idx);          log_debug("%s: s=$%u %s idx=%d", from, s->id, tmp, sc->idx);
           log_debug("%s: name=%s", from, sc->name == NULL ? "none" : sc->name);
         name = sc->name;  
         if (name == NULL)  
                 name = "none";  
         log_debug("%s: name=%s", from, name);  
 }  }
   
 struct winlink *  struct winlink *
 spawn_window(struct spawn_context *sc, char **cause)  spawn_window(struct spawn_context *sc, char **cause)
 {  {
         struct cmdq_item        *item = sc->item;          struct cmdq_item        *item = sc->item;
         struct client           *c = item->client;          struct client           *c = cmdq_get_client(item);
         struct session          *s = sc->s;          struct session          *s = sc->s;
         struct window           *w;          struct window           *w;
         struct window_pane      *wp;          struct window_pane      *wp;
Line 207 
Line 203 
 spawn_pane(struct spawn_context *sc, char **cause)  spawn_pane(struct spawn_context *sc, char **cause)
 {  {
         struct cmdq_item         *item = sc->item;          struct cmdq_item         *item = sc->item;
         struct client            *c = item->client;          struct cmd_find_state    *target = cmdq_get_target(item);
           struct client            *c = cmdq_get_client(item);
         struct session           *s = sc->s;          struct session           *s = sc->s;
         struct window            *w = sc->wl->window;          struct window            *w = sc->wl->window;
         struct window_pane       *new_wp;          struct window_pane       *new_wp;
Line 230 
Line 227 
          * the pane's stored one unless specified.           * the pane's stored one unless specified.
          */           */
         if (sc->cwd != NULL)          if (sc->cwd != NULL)
                 cwd = format_single(item, sc->cwd, c, item->target.s, NULL, NULL);                  cwd = format_single(item, sc->cwd, c, target->s, NULL, NULL);
         else if (~sc->flags & SPAWN_RESPAWN)          else if (~sc->flags & SPAWN_RESPAWN)
                 cwd = xstrdup(server_client_get_cwd(c, item->target.s));                  cwd = xstrdup(server_client_get_cwd(c, target->s));
         else          else
                 cwd = NULL;                  cwd = NULL;
   

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20