aboutsummaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-02-24 00:25:03 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-02-24 00:25:03 +0000
commitc5239c59846c2d09725d4b1db0e728b3376c3998 (patch)
tree1fedf6dcd02ec5c6b18ee45146dc21957d4b8c4e /layout.c
parentbe13479f099749b2a199e17505797e51090caca0 (diff)
downloadrtmux-c5239c59846c2d09725d4b1db0e728b3376c3998.tar.gz
rtmux-c5239c59846c2d09725d4b1db0e728b3376c3998.tar.bz2
rtmux-c5239c59846c2d09725d4b1db0e728b3376c3998.zip
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.
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c4
1 files changed, 2 insertions, 2 deletions
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);
}