mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Handle colour 8 properly in the 256 colour palette, from Timothy Allen.
This commit is contained in:
parent
5b2c8156d5
commit
6369ea10d7
8
style.c
8
style.c
@ -117,7 +117,7 @@ style_tostring(struct grid_cell *gc)
|
|||||||
|
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
|
|
||||||
if (gc->fg != 8) {
|
if (gc->fg != 8 || gc->flags & GRID_FLAG_FG256) {
|
||||||
if (gc->flags & GRID_FLAG_FG256)
|
if (gc->flags & GRID_FLAG_FG256)
|
||||||
c = gc->fg | 0x100;
|
c = gc->fg | 0x100;
|
||||||
else
|
else
|
||||||
@ -126,7 +126,7 @@ style_tostring(struct grid_cell *gc)
|
|||||||
comma = 1;
|
comma = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gc->bg != 8) {
|
if (gc->bg != 8 || gc->flags & GRID_FLAG_BG256) {
|
||||||
if (gc->flags & GRID_FLAG_BG256)
|
if (gc->flags & GRID_FLAG_BG256)
|
||||||
c = gc->bg | 0x100;
|
c = gc->bg | 0x100;
|
||||||
else
|
else
|
||||||
@ -221,13 +221,13 @@ style_apply_update(struct grid_cell *gc, struct options *oo, const char *name)
|
|||||||
struct grid_cell *gcp;
|
struct grid_cell *gcp;
|
||||||
|
|
||||||
gcp = options_get_style(oo, name);
|
gcp = options_get_style(oo, name);
|
||||||
if (gcp->fg != 8) {
|
if (gcp->fg != 8 || gcp->flags & GRID_FLAG_FG256) {
|
||||||
if (gcp->flags & GRID_FLAG_FG256)
|
if (gcp->flags & GRID_FLAG_FG256)
|
||||||
colour_set_fg(gc, gcp->fg | 0x100);
|
colour_set_fg(gc, gcp->fg | 0x100);
|
||||||
else
|
else
|
||||||
colour_set_fg(gc, gcp->fg);
|
colour_set_fg(gc, gcp->fg);
|
||||||
}
|
}
|
||||||
if (gcp->bg != 8) {
|
if (gcp->bg != 8 || gcp->flags & GRID_FLAG_BG256) {
|
||||||
if (gcp->flags & GRID_FLAG_BG256)
|
if (gcp->flags & GRID_FLAG_BG256)
|
||||||
colour_set_bg(gc, gcp->bg | 0x100);
|
colour_set_bg(gc, gcp->bg | 0x100);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user