aboutsummaryrefslogtreecommitdiff
path: root/cmd-list-buffers.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2014-06-18 09:31:07 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2014-06-18 09:31:07 +0100
commit77f582ff137808cc3743ad545f63422cc8e71a71 (patch)
tree5737aa67c96dcd11d3474989889189732e374900 /cmd-list-buffers.c
parentf5973b77763e3f8da8e8f6483464f6f4bc2f3981 (diff)
parent92af7f5901bd944e385e7fdbe8696b2c911ed776 (diff)
downloadrtmux-77f582ff137808cc3743ad545f63422cc8e71a71.tar.gz
rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.tar.bz2
rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'cmd-list-buffers.c')
-rw-r--r--cmd-list-buffers.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c
index f3987dda..c5a6e322 100644
--- a/cmd-list-buffers.c
+++ b/cmd-list-buffers.c
@@ -44,17 +44,15 @@ cmd_list_buffers_exec(unused struct cmd *self, struct cmd_q *cmdq)
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);