summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/spawn.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2021-03-11 06:31:05 +0000
committernicm <nicm@openbsd.org>2021-03-11 06:31:05 +0000
commitbaddd6b22ac853e5dde9561d909eb360b9f39560 (patch)
tree49755e6b54980103a1184887f149a496765159c6 /usr.bin/tmux/spawn.c
parentBuild install media with -fno-asynchronous-unwind-tables to further (diff)
downloadwireguard-openbsd-baddd6b22ac853e5dde9561d909eb360b9f39560.tar.xz
wireguard-openbsd-baddd6b22ac853e5dde9561d909eb360b9f39560.zip
Add split-window -Z to start the pane zoomed, GitHub issue 2591.
Diffstat (limited to 'usr.bin/tmux/spawn.c')
-rw-r--r--usr.bin/tmux/spawn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c
index d44420fa6e8..9317edf2938 100644
--- a/usr.bin/tmux/spawn.c
+++ b/usr.bin/tmux/spawn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spawn.c,v 1.27 2021/03/02 11:00:38 nicm Exp $ */
+/* $OpenBSD: spawn.c,v 1.28 2021/03/11 06:31:05 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -261,7 +261,10 @@ spawn_pane(struct spawn_context *sc, char **cause)
layout_init(w, new_wp);
} else {
new_wp = window_add_pane(w, sc->wp0, hlimit, sc->flags);
- layout_assign_pane(sc->lc, new_wp);
+ if (sc->flags & SPAWN_ZOOM)
+ layout_assign_pane(sc->lc, new_wp, 1);
+ else
+ layout_assign_pane(sc->lc, new_wp, 0);
}
/*