summaryrefslogtreecommitdiffstats
path: root/server-msg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-01 14:53:29 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-01 14:53:29 +0000
commitbfccbc67d193f91e6825e491f4cb6b466dcf255a (patch)
tree75cf85861a25d849306c461a4779e3ddfb2f4ec5 /server-msg.c
parent872696f7819f20eb5fdaa53c16221cf614952eb7 (diff)
Simple status line.
Diffstat (limited to 'server-msg.c')
-rw-r--r--server-msg.c11
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);