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

Diff for /src/usr.bin/tmux/cmd-respawn-pane.c between version 1.7 and 1.8

version 1.7, 2012/07/11 07:10:15 version 1.8, 2013/03/24 09:54:10
Line 28 
Line 28 
  * Respawn a pane (restart the command). Kill existing if -k given.   * Respawn a pane (restart the command). Kill existing if -k given.
  */   */
   
 enum cmd_retval  cmd_respawn_pane_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_respawn_pane_exec(struct cmd *, struct cmd_q *);
   
 const struct cmd_entry cmd_respawn_pane_entry = {  const struct cmd_entry cmd_respawn_pane_entry = {
         "respawn-pane", "respawnp",          "respawn-pane", "respawnp",
Line 41 
Line 41 
 };  };
   
 enum cmd_retval  enum cmd_retval
 cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct winlink          *wl;          struct winlink          *wl;
Line 53 
Line 53 
         char                    *cause;          char                    *cause;
         u_int                    idx;          u_int                    idx;
   
         if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL)          if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL)
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         w = wl->window;          w = wl->window;
   
         if (!args_has(self->args, 'k') && wp->fd != -1) {          if (!args_has(self->args, 'k') && wp->fd != -1) {
                 if (window_pane_index(wp, &idx) != 0)                  if (window_pane_index(wp, &idx) != 0)
                         fatalx("index not found");                          fatalx("index not found");
                 ctx->error(ctx, "pane still active: %s:%u.%u",                  cmdq_error(cmdq, "pane still active: %s:%u.%u",
                     s->name, wl->idx, idx);                      s->name, wl->idx, idx);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
Line 79 
Line 79 
         else          else
                 cmd = NULL;                  cmd = NULL;
         if (window_pane_spawn(wp, cmd, NULL, NULL, &env, s->tio, &cause) != 0) {          if (window_pane_spawn(wp, cmd, NULL, NULL, &env, s->tio, &cause) != 0) {
                 ctx->error(ctx, "respawn pane failed: %s", cause);                  cmdq_error(cmdq, "respawn pane failed: %s", cause);
                 free(cause);                  free(cause);
                 environ_free(&env);                  environ_free(&env);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8