diff options
author | 2019-06-01 16:21:37 +0000 | |
---|---|---|
committer | 2019-06-01 16:21:37 +0000 | |
commit | db8f8d0134e00c3df1ea78ba9920d96e1ddc7227 (patch) | |
tree | 4fa13913c21290df08c3a0957ef9587ae0513254 | |
parent | Do not eliminate frame pointers on i386. The entire i386 ecosystem assumes (diff) | |
download | wireguard-openbsd-db8f8d0134e00c3df1ea78ba9920d96e1ddc7227.tar.xz wireguard-openbsd-db8f8d0134e00c3df1ea78ba9920d96e1ddc7227.zip |
If only one of -x or -y is given, use the calculated size for the
other. Pointed out by Ben Boeckel.
-rw-r--r-- | usr.bin/tmux/cmd-new-session.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c index eee2e8f5d56..b2ab646f9ea 100644 --- a/usr.bin/tmux/cmd-new-session.c +++ b/usr.bin/tmux/cmd-new-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-session.c,v 1.118 2019/05/17 05:47:31 nicm Exp $ */ +/* $OpenBSD: cmd-new-session.c,v 1.119 2019/06/01 16:21:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -242,8 +242,13 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) /* Create the new session. */ oo = options_create(global_s_options); - if (args_has(args, 'x') || args_has(args, 'y')) + if (args_has(args, 'x') || args_has(args, 'y')) { + if (!args_has(args, 'x')) + dsx = sx; + if (!args_has(args, 'y')) + dsy = sy; options_set_string(oo, "default-size", 0, "%ux%u", dsx, dsy); + } env = environ_create(); if (c != NULL && !args_has(args, 'E')) environ_update(global_s_options, c->environ, env); |