Redraw client status lines on rename.

This commit is contained in:
Nicholas Marriott 2007-10-02 17:45:05 +00:00
parent 1c4ec6e47e
commit a6d3594d39
5 changed files with 16 additions and 6 deletions

View File

@ -1,5 +1,6 @@
02 October 2007
* (nicm) Redraw client status lines on rename.
* (nicm) Error on ambiguous command.
01 October 2007
@ -89,5 +90,5 @@
(including mutt, emacs). No status bar yet and no key remapping or other
customisation.
$Id: CHANGES,v 1.21 2007-10-02 17:36:16 nicm Exp $
$Id: CHANGES,v 1.22 2007-10-02 17:45:05 nicm Exp $

1
TODO
View File

@ -42,6 +42,7 @@
unlink window (error if window only linked to one session)
close window
kill session
set status on/off
- fix resize (width problems with multiple clients?)
- handle tmux in tmux (check $TMUX and abort)
- check for some reqd terminfo caps on startup

View File

@ -1,4 +1,4 @@
/* $Id: server-fn.c,v 1.10 2007-10-01 14:53:29 nicm Exp $ */
/* $Id: server-fn.c,v 1.11 2007-10-02 17:45:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -23,8 +23,6 @@
#include "tmux.h"
void server_draw_status(struct client *);
/* Find session from sessid. */
struct session *
server_find_sessid(struct sessid *sid, char **cause)

View File

@ -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);
}

3
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.32 2007-10-01 17:37:41 nicm Exp $ */
/* $Id: tmux.h,v 1.33 2007-10-02 17:45:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -551,6 +551,7 @@ void server_write_clients(
struct window *, enum hdrtype, const void *, size_t);
void server_window_changed(struct client *);
void server_draw_client(struct client *, u_int, u_int);
void server_draw_status(struct client *);
/* status.c */
void status_write(struct client *c);