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

Diff for /src/usr.bin/tmux/popup.c between version 1.5 and 1.6

version 1.5, 2020/03/31 06:35:38 version 1.6, 2020/04/01 09:05:27
Line 225 
Line 225 
         struct cmdq_item        *new_item;          struct cmdq_item        *new_item;
         struct cmd_parse_result *pr;          struct cmd_parse_result *pr;
         struct format_tree      *ft;          struct format_tree      *ft;
         const char              *cmd;          const char              *cmd, *buf;
           size_t                   len;
   
         if (KEYC_IS_MOUSE(event->key)) {          if (KEYC_IS_MOUSE(event->key)) {
                 if (pd->dragging != OFF) {                  if (pd->dragging != OFF) {
Line 258 
Line 259 
         }          }
   
         if (pd->ictx != NULL && (pd->flags & POPUP_WRITEKEYS)) {          if (pd->ictx != NULL && (pd->flags & POPUP_WRITEKEYS)) {
                 if (KEYC_IS_MOUSE(event->key))  
                         return (0);  
                 if (((pd->flags & (POPUP_CLOSEEXIT|POPUP_CLOSEEXITZERO)) == 0 ||                  if (((pd->flags & (POPUP_CLOSEEXIT|POPUP_CLOSEEXITZERO)) == 0 ||
                     pd->job == NULL) &&                      pd->job == NULL) &&
                     (event->key == '\033' || event->key == '\003'))                      (event->key == '\033' || event->key == '\003'))
                         return (1);                          return (1);
                 if (pd->job == NULL)                  if (pd->job == NULL)
                         return (0);                          return (0);
                   if (KEYC_IS_MOUSE(event->key)) {
                           /* Must be inside, checked already. */
                           if (!input_key_get_mouse(&pd->s, m, m->x - pd->px,
                               m->y - pd->py, &buf, &len))
                                   return (0);
                           bufferevent_write(job_get_event(pd->job), buf, len);
                           return (0);
                   }
                 input_key(NULL, &pd->s, job_get_event(pd->job), event->key);                  input_key(NULL, &pd->s, job_get_event(pd->job), event->key);
                 return (0);                  return (0);
         }          }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6