From c5239c59846c2d09725d4b1db0e728b3376c3998 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 24 Feb 2013 00:25:03 +0000 Subject: Add resize-pane -Z to temporary zoom the active pane to occupy the full window or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z by default. The pane is unzoomed on pretty much any excuse whatsoever. We considered making this a new layout but the requirements are quite different from layouts so decided it is better as a special case. Each current layout cell is saved, a temporary one-cell layout generated and all except the active pane set to NULL. Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and Thiago Padilha for testing an earlier version. --- layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layout.c') diff --git a/layout.c b/layout.c index 1f41506d..b74bd789 100644 --- a/layout.c +++ b/layout.c @@ -374,13 +374,13 @@ layout_destroy_cell(struct layout_cell *lc, struct layout_cell **lcroot) } void -layout_init(struct window *w) +layout_init(struct window *w, struct window_pane *wp) { struct layout_cell *lc; lc = w->layout_root = layout_create_cell(NULL); layout_set_size(lc, w->sx, w->sy, 0, 0); - layout_make_leaf(lc, TAILQ_FIRST(&w->panes)); + layout_make_leaf(lc, wp); layout_fix_panes(w, w->sx, w->sy); } -- cgit