=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-list-buffers.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- src/usr.bin/tmux/cmd-list-buffers.c 2014/04/24 09:14:43 1.20 +++ src/usr.bin/tmux/cmd-list-buffers.c 2014/05/13 07:34:35 1.21 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-buffers.c,v 1.20 2014/04/24 09:14:43 nicm Exp $ */ +/* $OpenBSD: cmd-list-buffers.c,v 1.21 2014/05/13 07:34:35 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -44,17 +44,15 @@ struct args *args = self->args; struct paste_buffer *pb; struct format_tree *ft; - u_int idx; char *line; const char *template; if ((template = args_get(args, 'F')) == NULL) template = LIST_BUFFERS_TEMPLATE; - idx = 0; - while ((pb = paste_walk_stack(&idx)) != NULL) { + pb = NULL; + while ((pb = paste_walk(pb)) != NULL) { ft = format_create(); - format_add(ft, "line", "%u", idx - 1); format_paste_buffer(ft, pb, 0); line = format_expand(ft, template);