diff options
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server-msg.c b/server-msg.c index 422896ad..0ea9299a 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.12 2007-09-30 13:02:14 nicm Exp $ */ +/* $Id: server-msg.c,v 1.13 2007-10-01 14:53:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -114,6 +114,9 @@ server_msg_fn_new(struct hdr *hdr, struct client *c) if (c->sy == 0) c->sy = 25; + if (c->sy >= status_lines) + c->sy -= status_lines; + data.name[(sizeof data.name) - 1] = '\0'; if (*data.name != '\0' && session_find(data.name) != NULL) { xasprintf(&msg, "duplicate session: %s", data.name); @@ -157,6 +160,9 @@ server_msg_fn_attach(struct hdr *hdr, struct client *c) if (c->sy == 0) c->sy = 25; + if (c->sy >= status_lines) + c->sy -= status_lines; + if ((c->session = server_find_sessid(&data.sid, &cause)) == NULL) { server_write_error(c, "%s", cause); xfree(cause); @@ -246,6 +252,9 @@ server_msg_fn_size(struct hdr *hdr, struct client *c) if (c->sy == 0) c->sy = 25; + if (c->sy >= status_lines) + c->sy -= status_lines; + if (window_resize(c->session->window, c->sx, c->sy) != 0) server_draw_client(c, 0, c->sy - 1); |