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

Diff for /src/usr.bin/tmux/cfg.c between version 1.82 and 1.83

version 1.82, 2021/02/22 08:18:13 version 1.83, 2021/04/07 12:50:12
Line 103 
Line 103 
         struct cmd_parse_input   pi;          struct cmd_parse_input   pi;
         struct cmd_parse_result *pr;          struct cmd_parse_result *pr;
         struct cmdq_item        *new_item0;          struct cmdq_item        *new_item0;
           struct cmdq_state       *state;
   
         if (new_item != NULL)          if (new_item != NULL)
                 *new_item = NULL;                  *new_item = NULL;
Line 136 
Line 137 
                 return (0);                  return (0);
         }          }
   
         new_item0 = cmdq_get_command(pr->cmdlist, NULL);  
         if (item != NULL)          if (item != NULL)
                   state = cmdq_copy_state(cmdq_get_state(item));
           else
                   state = cmdq_new_state(NULL, NULL, 0);
           cmdq_add_format(state, "current_file", "%s", pi.file);
   
           new_item0 = cmdq_get_command(pr->cmdlist, state);
           if (item != NULL)
                 new_item0 = cmdq_insert_after(item, new_item0);                  new_item0 = cmdq_insert_after(item, new_item0);
         else          else
                 new_item0 = cmdq_append(NULL, new_item0);                  new_item0 = cmdq_append(NULL, new_item0);
         cmd_list_free(pr->cmdlist);          cmd_list_free(pr->cmdlist);
           cmdq_free_state(state);
   
         if (new_item != NULL)          if (new_item != NULL)
                 *new_item = new_item0;                  *new_item = new_item0;
Line 156 
Line 164 
         struct cmd_parse_input   pi;          struct cmd_parse_input   pi;
         struct cmd_parse_result *pr;          struct cmd_parse_result *pr;
         struct cmdq_item        *new_item0;          struct cmdq_item        *new_item0;
           struct cmdq_state       *state;
   
         if (new_item != NULL)          if (new_item != NULL)
                 *new_item = NULL;                  *new_item = NULL;
Line 182 
Line 191 
                 return (0);                  return (0);
         }          }
   
         new_item0 = cmdq_get_command(pr->cmdlist, NULL);  
         if (item != NULL)          if (item != NULL)
                   state = cmdq_copy_state(cmdq_get_state(item));
           else
                   state = cmdq_new_state(NULL, NULL, 0);
           cmdq_add_format(state, "current_file", "%s", pi.file);
   
           new_item0 = cmdq_get_command(pr->cmdlist, state);
           if (item != NULL)
                 new_item0 = cmdq_insert_after(item, new_item0);                  new_item0 = cmdq_insert_after(item, new_item0);
         else          else
                 new_item0 = cmdq_append(NULL, new_item0);                  new_item0 = cmdq_append(NULL, new_item0);
         cmd_list_free(pr->cmdlist);          cmd_list_free(pr->cmdlist);
           cmdq_free_state(state);
   
         if (new_item != NULL)          if (new_item != NULL)
                 *new_item = new_item0;                  *new_item = new_item0;

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