mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-13 15:37:27 +02:00
Redraw client status lines on rename.
This commit is contained in:
11
server-msg.c
11
server-msg.c
@ -1,4 +1,4 @@
|
||||
/* $Id: server-msg.c,v 1.13 2007-10-01 14:53:29 nicm Exp $ */
|
||||
/* $Id: server-msg.c,v 1.14 2007-10-02 17:45:05 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -401,6 +401,7 @@ server_msg_fn_rename(struct hdr *hdr, struct client *c)
|
||||
char *cause;
|
||||
struct window *w;
|
||||
struct session *s;
|
||||
u_int i;
|
||||
|
||||
if (hdr->size != sizeof data)
|
||||
fatalx("bad MSG_RENAME size");
|
||||
@ -429,6 +430,14 @@ server_msg_fn_rename(struct hdr *hdr, struct client *c)
|
||||
strlcpy(w->name, data.newname, sizeof w->name);
|
||||
|
||||
server_write_client(c, MSG_DONE, NULL, 0);
|
||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||
c = ARRAY_ITEM(&clients, i);
|
||||
if (c != NULL && c->session != NULL) {
|
||||
if (session_has(c->session, w))
|
||||
server_draw_status(c);
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user