mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-14 07:49:01 +02:00
Simple status line.
This commit is contained in:
11
server-msg.c
11
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);
|
||||
|
||||
|
Reference in New Issue
Block a user