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

Diff for /src/usr.bin/tmux/window-copy.c between version 1.106 and 1.107

version 1.106, 2014/04/17 14:45:49 version 1.107, 2014/04/24 09:14:43
Line 776 
Line 776 
                 *data->inputstr = '\0';                  *data->inputstr = '\0';
                 break;                  break;
         case MODEKEYEDIT_PASTE:          case MODEKEYEDIT_PASTE:
                 if ((pb = paste_get_top(&global_buffers)) == NULL)                  if ((pb = paste_get_top()) == NULL)
                         break;                          break;
                 for (n = 0; n < pb->size; n++) {                  for (n = 0; n < pb->size; n++) {
                         ch = (u_char) pb->data[n];                          ch = (u_char) pb->data[n];
Line 1465 
Line 1465 
   
         if (idx == -1) {          if (idx == -1) {
                 limit = options_get_number(&global_options, "buffer-limit");                  limit = options_get_number(&global_options, "buffer-limit");
                 paste_add(&global_buffers, buf, len, limit);                  paste_add(buf, len, limit);
         } else if (paste_replace(&global_buffers, idx, buf, len) != 0)          } else if (paste_replace(idx, buf, len) != 0)
                 free(buf);                  free(buf);
 }  }
   
Line 1524 
Line 1524 
         if (idx == -1)          if (idx == -1)
                 idx = 0;                  idx = 0;
   
         if (idx == 0 && paste_get_top(&global_buffers) == NULL) {          if (idx == 0 && paste_get_top() == NULL) {
                 limit = options_get_number(&global_options, "buffer-limit");                  limit = options_get_number(&global_options, "buffer-limit");
                 paste_add(&global_buffers, buf, len, limit);                  paste_add(buf, len, limit);
                 return;                  return;
         }          }
   
         pb = paste_get_index(&global_buffers, idx);          pb = paste_get_index(idx);
         if (pb != NULL) {          if (pb != NULL) {
                 buf = xrealloc(buf, 1, len + pb->size);                  buf = xrealloc(buf, 1, len + pb->size);
                 memmove(buf + pb->size, buf, len);                  memmove(buf + pb->size, buf, len);
Line 1538 
Line 1538 
                 len += pb->size;                  len += pb->size;
         }          }
   
         if (paste_replace(&global_buffers, idx, buf, len) != 0)          if (paste_replace(idx, buf, len) != 0)
                 free(buf);                  free(buf);
 }  }
   

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.107