diff options
-rw-r--r-- | cmd-list-buffers.c | 4 | ||||
-rw-r--r-- | cmd-paste-buffer.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c index fc47ff07..d79df313 100644 --- a/cmd-list-buffers.c +++ b/cmd-list-buffers.c @@ -1,4 +1,4 @@ -/* $Id: cmd-list-buffers.c,v 1.4 2008-09-26 06:45:25 nicm Exp $ */ +/* $Id: cmd-list-buffers.c,v 1.5 2009-01-07 19:52:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -79,7 +79,7 @@ cmd_list_buffers_exec(struct cmd *self, struct cmd_ctx *ctx) } ctx->print(ctx, "%d: " - "%zu bytes: \"%s\"", idx, strlen(pb->data), tmp); + "%zu bytes: \"%s\"", idx - 1, strlen(pb->data), tmp); } else ctx->print(ctx, "%d: %zu bytes", idx, strlen(pb->data)); } 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); } |