Merge delete-buffer into cmd-set-buffer.c and change the paste buffer

API so it has one paste_free() rather than free_top and free_name
(everywhere that uses it already has the right pointer).
This commit is contained in:
nicm
2015-09-11 14:41:50 +00:00
parent cfabe30bec
commit a3de5dbab1
6 changed files with 36 additions and 122 deletions

View File

@ -102,12 +102,8 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
bufferevent_write(wp->event, "\033[201~", 6);
}
if (args_has(args, 'd')) {
if (bufname == NULL)
paste_free_top();
else
paste_free_name(bufname);
}
if (pb != NULL && args_has(args, 'd'))
paste_free(pb);
return (CMD_RETURN_NORMAL);
}