mirror of https://github.com/tmux/tmux.git
Tweak how the default size is worked out so it is more obvious.
parent
886fdb1f7e
commit
b0b07fb585
|
@ -207,7 +207,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
dsx = 80;
|
||||||
if (args_has(args, 'y')) {
|
if (args_has(args, 'y')) {
|
||||||
tmp = args_get(args, 'y');
|
tmp = args_get(args, 'y');
|
||||||
if (strcmp(tmp, "-") == 0) {
|
if (strcmp(tmp, "-") == 0) {
|
||||||
|
@ -222,7 +223,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
dsy = 24;
|
||||||
|
|
||||||
/* Find new session size. */
|
/* Find new session size. */
|
||||||
if (!detached && !is_control) {
|
if (!detached && !is_control) {
|
||||||
|
@ -233,13 +235,14 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
|
||||||
} else {
|
} else {
|
||||||
tmp = options_get_string(global_s_options, "default-size");
|
tmp = options_get_string(global_s_options, "default-size");
|
||||||
if (sscanf(tmp, "%ux%u", &sx, &sy) != 2) {
|
if (sscanf(tmp, "%ux%u", &sx, &sy) != 2) {
|
||||||
sx = 80;
|
|
||||||
sy = 24;
|
|
||||||
}
|
|
||||||
if (args_has(args, 'x'))
|
|
||||||
sx = dsx;
|
sx = dsx;
|
||||||
if (args_has(args, 'y'))
|
|
||||||
sy = dsy;
|
sy = dsy;
|
||||||
|
} else {
|
||||||
|
if (args_has(args, 'x'))
|
||||||
|
sx = dsx;
|
||||||
|
if (args_has(args, 'y'))
|
||||||
|
sy = dsy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sx == 0)
|
if (sx == 0)
|
||||||
sx = 1;
|
sx = 1;
|
||||||
|
|
Loading…
Reference in New Issue