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

Diff for /src/usr.bin/tmux/status.c between version 1.133 and 1.134

version 1.133, 2015/08/28 12:16:28 version 1.134, 2015/08/29 09:25:00
Line 815 
Line 815 
         struct options          *oo = &sess->options;          struct options          *oo = &sess->options;
         struct paste_buffer     *pb;          struct paste_buffer     *pb;
         char                    *s, *first, *last, word[64], swapc;          char                    *s, *first, *last, word[64], swapc;
         const char              *histstr;          const char              *histstr, *bufdata, *wsep = NULL;
         const char              *wsep = NULL;  
         u_char                   ch;          u_char                   ch;
         size_t                   size, n, off, idx;          size_t                   size, n, off, idx, bufsize;
   
         size = strlen(c->prompt_buffer);          size = strlen(c->prompt_buffer);
         switch (mode_key_lookup(&c->prompt_mdata, key, NULL)) {          switch (mode_key_lookup(&c->prompt_mdata, key, NULL)) {
Line 1067 
Line 1066 
                 c->flags |= CLIENT_STATUS;                  c->flags |= CLIENT_STATUS;
                 break;                  break;
         case MODEKEYEDIT_PASTE:          case MODEKEYEDIT_PASTE:
                 if ((pb = paste_get_top()) == NULL)                  if ((pb = paste_get_top(NULL)) == NULL)
                         break;                          break;
                 for (n = 0; n < pb->size; n++) {                  bufdata = paste_buffer_data(pb, &bufsize);
                         ch = (u_char) pb->data[n];                  for (n = 0; n < bufsize; n++) {
                           ch = (u_char)bufdata[n];
                         if (ch < 32 || ch == 127)                          if (ch < 32 || ch == 127)
                                 break;                                  break;
                 }                  }
   
                 c->prompt_buffer = xrealloc(c->prompt_buffer, size + n + 1);                  c->prompt_buffer = xrealloc(c->prompt_buffer, size + n + 1);
                 if (c->prompt_index == size) {                  if (c->prompt_index == size) {
                         memcpy(c->prompt_buffer + c->prompt_index, pb->data, n);                          memcpy(c->prompt_buffer + c->prompt_index, bufdata, n);
                         c->prompt_index += n;                          c->prompt_index += n;
                         c->prompt_buffer[c->prompt_index] = '\0';                          c->prompt_buffer[c->prompt_index] = '\0';
                 } else {                  } else {
                         memmove(c->prompt_buffer + c->prompt_index + n,                          memmove(c->prompt_buffer + c->prompt_index + n,
                             c->prompt_buffer + c->prompt_index,                              c->prompt_buffer + c->prompt_index,
                             size + 1 - c->prompt_index);                              size + 1 - c->prompt_index);
                         memcpy(c->prompt_buffer + c->prompt_index, pb->data, n);                          memcpy(c->prompt_buffer + c->prompt_index, bufdata, n);
                         c->prompt_index += n;                          c->prompt_index += n;
                 }                  }
   

Legend:
Removed from v.1.133  
changed lines
  Added in v.1.134