There is no longer a need for a paste_stack struct or for global_buffers

to be global. Move to paste.c.
This commit is contained in:
nicm
2014-04-24 09:14:43 +00:00
parent 7ab2690be8
commit bec6c807cd
14 changed files with 63 additions and 66 deletions

View File

@ -63,7 +63,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_ERROR);
utf8flag = options_get_number(&wl->window->options, "utf8");
if (paste_get_top(&global_buffers) == NULL)
if (paste_get_top() == NULL)
return (CMD_RETURN_NORMAL);
if (window_pane_set_mode(wl->window->active, &window_choose_mode) != 0)
@ -75,7 +75,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
action = xstrdup("paste-buffer -b '%%'");
idx = 0;
while ((pb = paste_walk_stack(&global_buffers, &idx)) != NULL) {
while ((pb = paste_walk_stack(&idx)) != NULL) {
cdata = window_choose_data_create(TREE_OTHER, c, c->session);
cdata->idx = idx - 1;