version 1.38, 2011/04/06 21:51:31 |
version 1.39, 2011/10/23 08:10:11 |
|
|
} |
} |
|
|
/* Find new session size. */ |
/* Find new session size. */ |
if (detached) { |
if (ctx->cmdclient != NULL) { |
|
sx = ctx->cmdclient->tty.sx; |
|
sy = ctx->cmdclient->tty.sy; |
|
} else if (ctx->curclient != NULL) { |
|
sx = ctx->curclient->tty.sx; |
|
sy = ctx->curclient->tty.sy; |
|
} else { |
sx = 80; |
sx = 80; |
sy = 24; |
sy = 24; |
|
} |
|
if (detached) { |
if (args_has(args, 'x')) { |
if (args_has(args, 'x')) { |
sx = strtonum( |
sx = strtonum( |
args_get(args, 'x'), 1, USHRT_MAX, &errstr); |
args_get(args, 'x'), 1, USHRT_MAX, &errstr); |
|
|
return (-1); |
return (-1); |
} |
} |
} |
} |
} else if (ctx->cmdclient != NULL) { |
|
sx = ctx->cmdclient->tty.sx; |
|
sy = ctx->cmdclient->tty.sy; |
|
} else { |
|
sx = ctx->curclient->tty.sx; |
|
sy = ctx->curclient->tty.sy; |
|
} |
} |
if (sy > 0 && options_get_number(&global_s_options, "status")) |
if (sy > 0 && options_get_number(&global_s_options, "status")) |
sy--; |
sy--; |