aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 6818ce9c..2fd13420 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -192,6 +192,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
if (strcmp(tmp, "-") == 0) {
if (c != NULL)
dsx = c->tty.sx;
+ else
+ dsx = 80;
} else {
dsx = strtonum(tmp, 1, USHRT_MAX, &errstr);
if (errstr != NULL) {
@@ -205,6 +207,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
if (strcmp(tmp, "-") == 0) {
if (c != NULL)
dsy = c->tty.sy;
+ else
+ dsy = 24;
} else {
dsy = strtonum(tmp, 1, USHRT_MAX, &errstr);
if (errstr != NULL) {