mirror of
https://github.com/tmux/tmux.git
synced 2024-11-19 10:58:51 +00:00
Should add buffer if no -b.
This commit is contained in:
parent
216ddf3da5
commit
62bb6e37e0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user