diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-10 14:21:29 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-10 14:21:29 +0000 |
commit | 83f640897906c3179c13445110286d1281ecf73c (patch) | |
tree | b4fc8f61b86e28f4c038a799a9d79c1ff25c8c6d /src/fe-text | |
parent | c1d61ddeaf7eed4fe655b46d109db4766ba67b5b (diff) | |
download | irssi-83f640897906c3179c13445110286d1281ecf73c.zip |
It's possible to use black foreground color now.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2418 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/gui-printtext.c | 4 | ||||
-rw-r--r-- | src/fe-text/textbuffer-view.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c index 3bd1de36..affd2b9f 100644 --- a/src/fe-text/gui-printtext.c +++ b/src/fe-text/gui-printtext.c @@ -244,8 +244,8 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor, if (window == NULL) { g_return_if_fail(next_xpos != -1); - attr |= fg > 0 ? fg : ATTR_RESETFG; - attr |= bg > 0 ? (bg << 4) : ATTR_RESETBG; + attr |= fg >= 0 ? fg : ATTR_RESETFG; + attr |= bg >= 0 ? (bg << 4) : ATTR_RESETBG; term_set_color(root_window, attr); term_move(root_window, next_xpos, next_ypos); diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index a5d7f2ed..d98fc85c 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -114,7 +114,7 @@ static void update_cmd_color(unsigned char cmd, int *color) if ((cmd & LINE_COLOR_DEFAULT) == 0) *color |= (cmd & 0x0f) << 4; else { - *color |= ATTR_RESETBG; + *color = (*color & FGATTR) | ATTR_RESETBG; if (cmd & LINE_COLOR_BLINK) *color |= ATTR_BLINK; } @@ -124,7 +124,7 @@ static void update_cmd_color(unsigned char cmd, int *color) if ((cmd & LINE_COLOR_DEFAULT) == 0) *color |= cmd & 0x0f; else { - *color |= ATTR_RESETFG; + *color = (*color & BGATTR) | ATTR_RESETFG; if (cmd & LINE_COLOR_BOLD) *color |= ATTR_BOLD; } |