diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-04-24 12:59:00 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-04-24 12:59:00 +0100 |
commit | 3f54c9292fc8ee147d45256e430fbf85fab98128 (patch) | |
tree | afe1e1fe8ca82a88e7e6bbd94fb877f58c2e69c4 /window-copy.c | |
parent | 953c3ef47a1933d38308075c1bacc7ea8d38301b (diff) | |
parent | bec6c807cd580b003cd94b52a20caa2cbc7a0753 (diff) | |
download | rtmux-3f54c9292fc8ee147d45256e430fbf85fab98128.tar.gz rtmux-3f54c9292fc8ee147d45256e430fbf85fab98128.tar.bz2 rtmux-3f54c9292fc8ee147d45256e430fbf85fab98128.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'window-copy.c')
-rw-r--r-- | window-copy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/window-copy.c b/window-copy.c index afa6d4d1..508001d3 100644 --- a/window-copy.c +++ b/window-copy.c @@ -776,7 +776,7 @@ window_copy_key_input(struct window_pane *wp, int key) *data->inputstr = '\0'; break; case MODEKEYEDIT_PASTE: - if ((pb = paste_get_top(&global_buffers)) == NULL) + if ((pb = paste_get_top()) == NULL) break; for (n = 0; n < pb->size; n++) { ch = (u_char) pb->data[n]; @@ -1465,8 +1465,8 @@ window_copy_copy_buffer(struct window_pane *wp, int idx, void *buf, size_t len) if (idx == -1) { limit = options_get_number(&global_options, "buffer-limit"); - paste_add(&global_buffers, buf, len, limit); - } else if (paste_replace(&global_buffers, idx, buf, len) != 0) + paste_add(buf, len, limit); + } else if (paste_replace(idx, buf, len) != 0) free(buf); } @@ -1524,13 +1524,13 @@ window_copy_append_selection(struct window_pane *wp, int idx) if (idx == -1) 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"); - paste_add(&global_buffers, buf, len, limit); + paste_add(buf, len, limit); return; } - pb = paste_get_index(&global_buffers, idx); + pb = paste_get_index(idx); if (pb != NULL) { buf = xrealloc(buf, 1, len + pb->size); memmove(buf + pb->size, buf, len); @@ -1538,7 +1538,7 @@ window_copy_append_selection(struct window_pane *wp, int idx) len += pb->size; } - if (paste_replace(&global_buffers, idx, buf, len) != 0) + if (paste_replace(idx, buf, len) != 0) free(buf); } |