-/* $OpenBSD: format.c,v 1.62 2015/04/21 15:18:38 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.63 2015/04/21 22:38:49 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
ft->w = w;
- layout = layout_dump(w);
+ if (w->saved_layout_root != NULL)
+ layout = layout_dump(w->saved_layout_root);
+ else
+ layout = layout_dump(w->layout_root);
format_add(ft, "window_id", "@%u", w->id);
format_add(ft, "window_name", "%s", w->name);
-/* $OpenBSD: layout-custom.c,v 1.6 2013/03/25 11:35:30 nicm Exp $ */
+/* $OpenBSD: layout-custom.c,v 1.7 2015/04/21 22:38:49 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
/* Dump layout as a string. */
char *
-layout_dump(struct window *w)
+layout_dump(struct layout_cell *root)
{
char layout[BUFSIZ], *out;
*layout = '\0';
- if (layout_append(w->layout_root, layout, sizeof layout) != 0)
+ if (layout_append(root, layout, sizeof layout) != 0)
return (NULL);
xasprintf(&out, "%04x,%s", layout_checksum(layout), layout);
-/* $OpenBSD: tmux.h,v 1.493 2015/04/20 15:34:56 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.494 2015/04/21 22:38:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
void layout_close_pane(struct window_pane *);
/* layout-custom.c */
-char *layout_dump(struct window *);
+char *layout_dump(struct layout_cell *);
int layout_parse(struct window *, const char *);
/* layout-set.c */
-/* $OpenBSD: window.c,v 1.119 2015/04/20 07:50:49 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.120 2015/04/21 22:38:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
w->flags &= ~WINDOW_ZOOMED;
layout_free(w);
w->layout_root = w->saved_layout_root;
+ w->saved_layout_root = NULL;
TAILQ_FOREACH(wp, &w->panes, entry) {
wp->layout_cell = wp->saved_layout_cell;