Merge branch 'obsd-master'

Conflicts:
	format.c
	window.c
This commit is contained in:
Thomas Adam
2014-05-13 21:58:48 +01:00
29 changed files with 747 additions and 486 deletions

View File

@ -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);