diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-24 18:32:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-24 18:32:52 +0000 |
commit | b9034946adeb2ed03a1266431a27e2a24498c350 (patch) | |
tree | 0a04d9954a7361408da80d901d7c2c500903fee1 | |
parent | 112f4d9f607f31d52bc63321f3bd7fdfcb0ced6d (diff) |
Reset before calling window_draw otherwise it'll have the wrong idea of the current state (since it copies from screen).
-rw-r--r-- | server-fn.c | 8 | ||||
-rw-r--r-- | tmux.h | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/server-fn.c b/server-fn.c index afbbded2..0e4a0f37 100644 --- a/server-fn.c +++ b/server-fn.c @@ -1,4 +1,4 @@ -/* $Id: server-fn.c,v 1.33 2007-11-24 18:09:59 nicm Exp $ */ +/* $Id: server-fn.c,v 1.34 2007-11-24 18:32:52 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -343,7 +343,7 @@ server_write_message(struct client *c, const char *fmt, ...) size = BUFFER_USED(c->out); screen_draw_start(&ctx, &w->screen, c->out, 0, 0); - screen_draw_move(&ctx, 0, c->sy); + screen_draw_move(&ctx, 0, c->sy - 1); screen_draw_set_attributes(&ctx, ATTR_REVERSE, 0x88); va_start(ap, fmt); xvasprintf(&msg, fmt, ap); @@ -368,11 +368,11 @@ server_write_message(struct client *c, const char *fmt, ...) buffer_add(c->out, sizeof hdr); size = BUFFER_USED(c->out); + screen_draw_stop(&ctx); if (status_lines == 0) - window_draw(w, c->out, screen_last_y(&w->screen), 1); + window_draw(w, c->out, c->sy - 1, 1); else status_write(c); - screen_draw_stop(&ctx); size = BUFFER_USED(c->out) - size; hdr.type = MSG_DATA; @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.98 2007-11-23 17:52:54 nicm Exp $ */ +/* $Id: tmux.h,v 1.99 2007-11-24 18:32:52 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -374,8 +374,8 @@ struct screen { u_int saved_cx; u_int saved_cy; - u_int saved_attr; - u_int saved_colr; + u_char saved_attr; + u_char saved_colr; int mode; }; @@ -402,8 +402,8 @@ struct screen_draw_ctx { u_int ox; u_int oy; - u_int attr; - u_int colr; + u_char attr; + u_char colr; struct screen_draw_sel sel; }; |