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

Diff for /src/usr.bin/tmux/cmd-if-shell.c between version 1.62 and 1.63

version 1.62, 2019/05/25 07:15:53 version 1.63, 2019/06/12 08:47:07
Line 67 
Line 67 
         struct cmd_if_shell_data        *cdata;          struct cmd_if_shell_data        *cdata;
         char                            *shellcmd, *cmd;          char                            *shellcmd, *cmd;
         struct cmdq_item                *new_item;          struct cmdq_item                *new_item;
           struct cmd_find_state           *fs = &item->target;
         struct client                   *c = cmd_find_client(item, NULL, 1);          struct client                   *c = cmd_find_client(item, NULL, 1);
         struct session                  *s = item->target.s;          struct session                  *s = fs->s;
         struct winlink                  *wl = item->target.wl;          struct winlink                  *wl = fs->wl;
         struct window_pane              *wp = item->target.wp;          struct window_pane              *wp = fs->wp;
         struct cmd_parse_input           pi;          struct cmd_parse_input           pi;
         struct cmd_parse_result         *pr;          struct cmd_parse_result         *pr;
   
Line 92 
Line 93 
                 pi.line = self->line;                  pi.line = self->line;
                 pi.item = item;                  pi.item = item;
                 pi.c = c;                  pi.c = c;
                 cmd_find_copy_state(&pi.fs, &item->target);                  cmd_find_copy_state(&pi.fs, fs);
   
                 pr = cmd_parse_from_string(cmd, &pi);                  pr = cmd_parse_from_string(cmd, &pi);
                 switch (pr->status) {                  switch (pr->status) {
Line 103 
Line 104 
                         free(pr->error);                          free(pr->error);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 case CMD_PARSE_SUCCESS:                  case CMD_PARSE_SUCCESS:
                         new_item = cmdq_get_command(pr->cmdlist, NULL, m, 0);                          new_item = cmdq_get_command(pr->cmdlist, fs, m, 0);
                         cmdq_insert_after(item, new_item);                          cmdq_insert_after(item, new_item);
                         cmd_list_free(pr->cmdlist);                          cmd_list_free(pr->cmdlist);
                         break;                          break;
Line 137 
Line 138 
         cdata->input.c = c;          cdata->input.c = c;
         if (cdata->input.c != NULL)          if (cdata->input.c != NULL)
                 cdata->input.c->references++;                  cdata->input.c->references++;
         cmd_find_copy_state(&cdata->input.fs, &item->target);          cmd_find_copy_state(&cdata->input.fs, fs);
   
         if (job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL,          if (job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL,
             cmd_if_shell_callback, cmd_if_shell_free, cdata, 0) == NULL) {              cmd_if_shell_callback, cmd_if_shell_free, cdata, 0) == NULL) {

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63