summaryrefslogtreecommitdiffstats
path: root/cmd-paste-buffer.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-07 19:52:36 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-07 19:52:36 +0000
commit51ca51e329b1ddcbe4a40c76ee5195bd39d34c10 (patch)
tree609ca001019c0677e31a96326b948e9547840125 /cmd-paste-buffer.c
parent8810fc158c597f4e6ad0b03de55e1a1a03a41874 (diff)
Buffers should be numbered from zero, from Tiago Cunha. Also fix paste -b.
Diffstat (limited to 'cmd-paste-buffer.c')
-rw-r--r--cmd-paste-buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-paste-buffer.c b/cmd-paste-buffer.c
index 9d9b5797..7f69a155 100644
--- a/cmd-paste-buffer.c
+++ b/cmd-paste-buffer.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-paste-buffer.c,v 1.11 2008-06-20 18:58:13 nicm Exp $ */
+/* $Id: cmd-paste-buffer.c,v 1.12 2009-01-07 19:52:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -55,7 +55,7 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
if (data->buffer == -1)
pb = paste_get_top(&s->buffers);
else {
- if ((pb = paste_get_top(&s->buffers)) == NULL)
+ if ((pb = paste_get_index(&s->buffers, data->buffer)) == NULL)
ctx->error(ctx, "no buffer %d", data->buffer);
}