mirror of
https://github.com/tmux/tmux.git
synced 2025-01-13 11:58:51 +00:00
If only one of -x or -y is given, use the calculated size for the
other. Pointed out by Ben Boeckel.
This commit is contained in:
parent
39ea8a2787
commit
2c6c3a1d27
@ -242,8 +242,13 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
|
|
||||||
/* Create the new session. */
|
/* Create the new session. */
|
||||||
oo = options_create(global_s_options);
|
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);
|
options_set_string(oo, "default-size", 0, "%ux%u", dsx, dsy);
|
||||||
|
}
|
||||||
env = environ_create();
|
env = environ_create();
|
||||||
if (c != NULL && !args_has(args, 'E'))
|
if (c != NULL && !args_has(args, 'E'))
|
||||||
environ_update(global_s_options, c->environ, env);
|
environ_update(global_s_options, c->environ, env);
|
||||||
|
Loading…
Reference in New Issue
Block a user