summaryrefslogtreecommitdiffstats
path: root/cmd-paste-buffer.c
diff options
context:
space:
mode:
authornicm <nicm>2015-09-11 14:41:50 +0000
committernicm <nicm>2015-09-11 14:41:50 +0000
commita3de5dbab1680528d622a5054075e3d8efced795 (patch)
tree1417f7b21aea11c4911a5f95d1de02f3faa079a6 /cmd-paste-buffer.c
parentcfabe30becba6f0c54035a29ee61a6a7f3d0cf60 (diff)
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).
Diffstat (limited to 'cmd-paste-buffer.c')
-rw-r--r--cmd-paste-buffer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd-paste-buffer.c b/cmd-paste-buffer.c
index cd3fc7d8..87f09ee6 100644
--- a/cmd-paste-buffer.c
+++ b/cmd-paste-buffer.c
@@ -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);
}