summaryrefslogtreecommitdiffstats
path: root/cmd-join-pane.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 /cmd-join-pane.c
parentbe13479f099749b2a199e17505797e51090caca0 (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 'cmd-join-pane.c')
-rw-r--r--cmd-join-pane.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd-join-pane.c b/cmd-join-pane.c
index 78868cf1..2cf587e0 100644
--- a/cmd-join-pane.c
+++ b/cmd-join-pane.c
@@ -91,11 +91,13 @@ join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window)
return (CMD_RETURN_ERROR);
dst_w = dst_wl->window;
dst_idx = dst_wl->idx;
+ server_unzoom_window(dst_w);
src_wl = cmd_find_pane(cmdq, args_get(args, 's'), NULL, &src_wp);
if (src_wl == NULL)
return (CMD_RETURN_ERROR);
src_w = src_wl->window;
+ server_unzoom_window(src_w);
if (not_same_window && src_w == dst_w) {
cmdq_error(cmdq, "can't join a pane to its own window");