diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-24 00:25:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-24 00:25:03 +0000 |
commit | c5239c59846c2d09725d4b1db0e728b3376c3998 (patch) | |
tree | 1fedf6dcd02ec5c6b18ee45146dc21957d4b8c4e /server-fn.c | |
parent | be13479f099749b2a199e17505797e51090caca0 (diff) |
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 'server-fn.c')
-rw-r--r-- | server-fn.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server-fn.c b/server-fn.c index e3365db2..b09415e0 100644 --- a/server-fn.c +++ b/server-fn.c @@ -377,6 +377,7 @@ server_destroy_pane(struct window_pane *wp) return; } + server_unzoom_window(w); layout_close_pane(wp); window_remove_pane(w, wp); @@ -588,3 +589,11 @@ server_set_stdin_callback(struct client *c, void (*cb)(struct client *, int, return (0); } + +void +server_unzoom_window(struct window *w) +{ + window_unzoom(w); + server_redraw_window(w); + server_status_window(w); +} |