diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-05-13 21:58:48 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-05-13 21:58:48 +0100 |
commit | bae95844d75b257c61cd0ef57b1d826bdca09032 (patch) | |
tree | e2547df0ea03a6f686ac0cf7500bed3d00994ad2 /cmd-list-buffers.c | |
parent | ea5a223a2e8901fa9afa991d147751d8a6789443 (diff) | |
parent | b3e8d440ed0477e88232c3ba1779c67eafce3a48 (diff) | |
download | rtmux-bae95844d75b257c61cd0ef57b1d826bdca09032.tar.gz rtmux-bae95844d75b257c61cd0ef57b1d826bdca09032.tar.bz2 rtmux-bae95844d75b257c61cd0ef57b1d826bdca09032.zip |
Merge branch 'obsd-master'
Conflicts:
format.c
window.c
Diffstat (limited to 'cmd-list-buffers.c')
-rw-r--r-- | cmd-list-buffers.c | 6 |
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); |