status-lines -> status, prefix-key -> prefix

This commit is contained in:
Nicholas Marriott
2008-06-19 22:04:02 +00:00
parent 24cc3626dc
commit 73d1558ed0
10 changed files with 41 additions and 34 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-new-session.c,v 1.28 2008-06-18 16:39:15 nicm Exp $ */
/* $Id: cmd-new-session.c,v 1.29 2008-06-19 22:04:02 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -116,7 +116,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
struct client *c = ctx->cmdclient;
struct session *s;
char *cmd, *cause;
u_int sx, sy, slines;
u_int sx, sy;
if (ctx->flags & CMD_KEY)
return;
@ -148,10 +148,12 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
sy = c->sy;
}
slines = options_get_number(&global_options, "status-lines");
if (sy < slines)
sy = slines + 1;
sy -= slines;
if (options_get_number(&global_options, "status")) {
if (sy == 0)
sy = 1;
else
sy--;
}
if (!data->flag_detached && tty_open(&c->tty, &cause) != 0) {
ctx->error(ctx, "%s", cause);