summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-split-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-03-24 09:58:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-03-24 09:58:00 +0000
commit047a733e6947034ce62a51ab1301d5cfb3bd0abe (patch)
tree877a049ef2934bc136505a98ed24a2e8e2dedb7f /usr.bin/tmux/cmd-split-window.c
parente6e3e05e33040b1ac0ab0fd4e1a39aa94323411d (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 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r--usr.bin/tmux/cmd-split-window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c
index 863d01bf87a..14f911cbebe 100644
--- a/usr.bin/tmux/cmd-split-window.c
+++ b/usr.bin/tmux/cmd-split-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-split-window.c,v 1.40 2013/03/24 09:54:10 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.41 2013/03/24 09:57:59 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -73,6 +73,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL)
return (CMD_RETURN_ERROR);
w = wl->window;
+ server_unzoom_window(w);
environ_init(&env);
environ_copy(&global_environ, &env);