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 :-/.

This commit is contained in:
Nicholas Marriott
2008-09-08 22:03:56 +00:00
parent cecd7c0cc8
commit 6674197e85
8 changed files with 136 additions and 95 deletions

View File

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