From bfccbc67d193f91e6825e491f4cb6b466dcf255a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 1 Oct 2007 14:53:29 +0000 Subject: Simple status line. --- server-msg.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'server-msg.c') 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 @@ -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); -- cgit