From c71844de631186f3df7ff5a6e3aab613da1e4853 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 24 Mar 2013 09:57:59 +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 f08580b7..4dd3756c 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 v1.2.3