diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-08 22:03:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-08 22:03:56 +0000 |
commit | 6674197e853ddec4ab1af04ede3ebabcdcc581c5 (patch) | |
tree | 529afe1a8b42190111f446a46c3b2d8cd8edcf21 /status.c | |
parent | cecd7c0cc8457e849c65d4971863b0010613db91 (diff) | |
download | rtmux-6674197e853ddec4ab1af04ede3ebabcdcc581c5.tar.gz rtmux-6674197e853ddec4ab1af04ede3ebabcdcc581c5.tar.bz2 rtmux-6674197e853ddec4ab1af04ede3ebabcdcc581c5.zip |
Fix bold/non-bold mismatch in 256 colour mode by adding an extra 8 bits (ick) onto the attributes and using two of them to mark the fg and bg as 256 colours when necessary. If only it was 255 colours we would have one value for default and wouln't need this :-/.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.44 2008-09-08 17:40:51 nicm Exp $ */ +/* $Id: status.c,v 1.45 2008-09-08 22:03:54 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -25,7 +25,7 @@ #include "tmux.h" size_t status_width(struct winlink *); -char *status_print(struct session *, struct winlink *, u_char *); +char *status_print(struct session *, struct winlink *, u_short *); /* Draw status for client on the last lines of given context. */ void @@ -38,7 +38,8 @@ status_redraw(struct client *c) char lbuf[BUFSIZ], rbuf[BUFSIZ]; size_t llen, rlen, offset, xx, yy; size_t size, start, width; - u_char attr, fg, bg; + u_short attr; + u_char fg, bg; struct tm *tm; time_t t; int larrow, rarrow; @@ -275,7 +276,7 @@ status_width(struct winlink *wl) } char * -status_print(struct session *s, struct winlink *wl, u_char *attr) +status_print(struct session *s, struct winlink *wl, u_short *attr) { char *text, flag; |