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

Diff for /src/usr.bin/tmux/cmd-queue.c between version 1.83 and 1.84

version 1.83, 2020/04/13 10:59:58 version 1.84, 2020/04/13 13:32:09
Line 25 
Line 25 
   
 #include "tmux.h"  #include "tmux.h"
   
   /* Command queue flags. */
   #define CMDQ_FIRED 0x1
   #define CMDQ_WAITING 0x2
   
 /* Command queue item type. */  /* Command queue item type. */
 enum cmdq_type {  enum cmdq_type {
         CMDQ_COMMAND,          CMDQ_COMMAND,
Line 224 
Line 228 
         struct options_array_item       *a;          struct options_array_item       *a;
         struct cmd_list                 *cmdlist;          struct cmd_list                 *cmdlist;
   
         if (item->flags & CMDQ_NOHOOKS)          if (item->shared->flags & CMDQ_SHARED_NOHOOKS)
                 return;                  return;
         if (s == NULL)          if (s == NULL)
                 oo = global_s_options;                  oo = global_s_options;
Line 250 
Line 254 
                         continue;                          continue;
                 }                  }
   
                 new_item = cmdq_get_command(cmdlist, fs, NULL, CMDQ_NOHOOKS);                  new_item = cmdq_get_command(cmdlist, fs, NULL,
                       CMDQ_SHARED_NOHOOKS);
                 cmdq_format(new_item, "hook", "%s", name);                  cmdq_format(new_item, "hook", "%s", name);
                 if (item != NULL)                  if (item != NULL)
                         item = cmdq_insert_after(item, new_item);                          item = cmdq_insert_after(item, new_item);
Line 330 
Line 335 
                                 cmd_find_clear_state(&shared->current, 0);                                  cmd_find_clear_state(&shared->current, 0);
                         if (m != NULL)                          if (m != NULL)
                                 memcpy(&shared->mouse, m, sizeof shared->mouse);                                  memcpy(&shared->mouse, m, sizeof shared->mouse);
                           shared->flags = flags;
                         last_group = group;                          last_group = group;
                 }                  }
                 entry = cmd_get_entry(cmd);                  entry = cmd_get_entry(cmd);
Line 337 
Line 343 
                 item = xcalloc(1, sizeof *item);                  item = xcalloc(1, sizeof *item);
                 xasprintf(&item->name, "[%s/%p]", entry->name, item);                  xasprintf(&item->name, "[%s/%p]", entry->name, item);
                 item->type = CMDQ_COMMAND;                  item->type = CMDQ_COMMAND;
   
                 item->group = group;                  item->group = group;
                 item->flags = flags;  
   
                 item->shared = shared;                  item->shared = shared;
                 item->cmdlist = cmdlist;                  item->cmdlist = cmdlist;
Line 447 
Line 451 
         item = xcalloc(1, sizeof *item);          item = xcalloc(1, sizeof *item);
         xasprintf(&item->name, "[%s/%p]", name, item);          xasprintf(&item->name, "[%s/%p]", name, item);
         item->type = CMDQ_CALLBACK;          item->type = CMDQ_CALLBACK;
   
         item->group = 0;          item->group = 0;
         item->flags = 0;  
   
         item->cb = cb;          item->cb = cb;
         item->data = data;          item->data = data;

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