diff options
author | Tiago Cunha <tcunha@gmx.com> | 2010-12-30 22:39:49 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2010-12-30 22:39:49 +0000 |
commit | 9ebee6aef8aab237314e167f0d0412ddc5ebf513 (patch) | |
tree | 61d060770b8af5e2a467badb74a3aab4d71a6372 /cmd-paste-buffer.c | |
parent | 095e1b410a31166d1f37e8a6ff99e7bb666737ad (diff) | |
download | rtmux-9ebee6aef8aab237314e167f0d0412ddc5ebf513.tar.gz rtmux-9ebee6aef8aab237314e167f0d0412ddc5ebf513.tar.bz2 rtmux-9ebee6aef8aab237314e167f0d0412ddc5ebf513.zip |
Global paste buffers instead of per-session which renders copy-buffer useless.
As a consequence buffer-limit is now a server option.
Diffstat (limited to 'cmd-paste-buffer.c')
-rw-r--r-- | cmd-paste-buffer.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd-paste-buffer.c b/cmd-paste-buffer.c index 1d6d35a7..d23b3b90 100644 --- a/cmd-paste-buffer.c +++ b/cmd-paste-buffer.c @@ -1,4 +1,4 @@ -/* $Id: cmd-paste-buffer.c,v 1.29 2010-08-11 22:17:32 tcunha Exp $ */ +/* $Id: cmd-paste-buffer.c,v 1.30 2010-12-30 22:39:49 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -135,9 +135,10 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmd_ctx *ctx) return (-1); if (data->buffer == -1) - pb = paste_get_top(&s->buffers); + pb = paste_get_top(&global_buffers); else { - if ((pb = paste_get_index(&s->buffers, data->buffer)) == NULL) { + pb = paste_get_index(&global_buffers, data->buffer); + if (pb == NULL) { ctx->error(ctx, "no buffer %d", data->buffer); return (-1); } @@ -149,9 +150,9 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmd_ctx *ctx) /* Delete the buffer if -d. */ if (data->flag_delete) { if (data->buffer == -1) - paste_free_top(&s->buffers); + paste_free_top(&global_buffers); else - paste_free_index(&s->buffers, data->buffer); + paste_free_index(&global_buffers, data->buffer); } return (0); |