diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-09-14 16:01:08 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-09-14 16:01:08 +0100 |
commit | b5d789a53167552e355848ecfec100cb70b61d97 (patch) | |
tree | e13896fd562fce8bf58a2b48da9023ace05f6057 /cmd-set-buffer.c | |
parent | 166aa97f75d01dababc94c78b8ca1192479166a7 (diff) | |
parent | 16ee4de5df3c31e362ed095e3feae1b504ddf1c5 (diff) | |
download | rtmux-b5d789a53167552e355848ecfec100cb70b61d97.tar.gz rtmux-b5d789a53167552e355848ecfec100cb70b61d97.tar.bz2 rtmux-b5d789a53167552e355848ecfec100cb70b61d97.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-set-buffer.c')
-rw-r--r-- | cmd-set-buffer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd-set-buffer.c b/cmd-set-buffer.c index 01afa774..e7f7627e 100644 --- a/cmd-set-buffer.c +++ b/cmd-set-buffer.c @@ -56,11 +56,13 @@ cmd_set_buffer_exec(struct cmd *self, struct cmd_q *cmdq) bufname = args_get(args, 'b'); if (bufname == NULL) - pb = paste_get_top(&bufname); + pb = NULL; else pb = paste_get_name(bufname); if (self->entry == &cmd_delete_buffer_entry) { + if (pb == NULL) + pb = paste_get_top(&bufname); if (pb == NULL) { cmdq_error(cmdq, "no buffer"); return (CMD_RETURN_ERROR); @@ -70,6 +72,8 @@ cmd_set_buffer_exec(struct cmd *self, struct cmd_q *cmdq) } if (args_has(args, 'n')) { + if (pb == NULL) + pb = paste_get_top(&bufname); if (pb == NULL) { cmdq_error(cmdq, "no buffer"); return (CMD_RETURN_ERROR); |