=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-new-session.c,v retrieving revision 1.123 retrieving revision 1.124 diff -c -r1.123 -r1.124 *** src/usr.bin/tmux/cmd-new-session.c 2020/04/03 13:54:31 1.123 --- src/usr.bin/tmux/cmd-new-session.c 2020/04/09 13:57:18 1.124 *************** *** 1,4 **** ! /* $OpenBSD: cmd-new-session.c,v 1.123 2020/04/03 13:54:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-new-session.c,v 1.124 2020/04/09 13:57:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 207,213 **** goto fail; } } ! } if (args_has(args, 'y')) { tmp = args_get(args, 'y'); if (strcmp(tmp, "-") == 0) { --- 207,214 ---- goto fail; } } ! } else ! dsx = 80; if (args_has(args, 'y')) { tmp = args_get(args, 'y'); if (strcmp(tmp, "-") == 0) { *************** *** 222,228 **** goto fail; } } ! } /* Find new session size. */ if (!detached && !is_control) { --- 223,230 ---- goto fail; } } ! } else ! dsy = 24; /* Find new session size. */ if (!detached && !is_control) { *************** *** 233,245 **** } else { tmp = options_get_string(global_s_options, "default-size"); if (sscanf(tmp, "%ux%u", &sx, &sy) != 2) { - sx = 80; - sy = 24; - } - if (args_has(args, 'x')) sx = dsx; - if (args_has(args, 'y')) sy = dsy; } if (sx == 0) sx = 1; --- 235,248 ---- } else { tmp = options_get_string(global_s_options, "default-size"); if (sscanf(tmp, "%ux%u", &sx, &sy) != 2) { sx = dsx; sy = dsy; + } else { + if (args_has(args, 'x')) + sx = dsx; + if (args_has(args, 'y')) + sy = dsy; + } } if (sx == 0) sx = 1;