summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-printtext.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-12 19:43:32 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-12 19:43:32 +0000
commit1d453ed92c17c657e1a9984b6566a6f761214237 (patch)
treef24e6c8bdcc6251123cbd3034951e3ce7287e4d6 /src/fe-text/gui-printtext.c
parent7ced2beab412c51b80155bd7ef98f9fff117f6d1 (diff)
downloadirssi-1d453ed92c17c657e1a9984b6566a6f761214237.zip
%n+bg color change doesn't anymore set foreground black. changed theme's
default_bold_color to default_real_color. Activity list printed first item with white always. Color redrawed itself every second. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1381 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-printtext.c')
-rw-r--r--src/fe-text/gui-printtext.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c
index 6f6dd829..5f8efdad 100644
--- a/src/fe-text/gui-printtext.c
+++ b/src/fe-text/gui-printtext.c
@@ -282,16 +282,17 @@ static void get_colors(int flags, int *fg, int *bg)
if (flags & PRINTFLAG_MIRC_COLOR) {
/* mirc colors - real range is 0..15, but after 16
colors wrap to 0, 1, ... */
- *fg = *fg < 0 ?
- current_theme->default_color : mirc_colors[*fg % 16];
*bg = *bg < 0 ? 0 : mirc_colors[*bg % 16];
+ if (*fg > 0) *fg = mirc_colors[*fg % 16];
} else {
/* default colors */
- *fg = *fg < 0 || *fg > 15 ?
- current_theme->default_color : *fg;
*bg = *bg < 0 || *bg > 15 ? 0 : *bg;
+ if (*fg > 8) *fg &= ~8;
+ }
- if (*fg > 8) *fg -= 8;
+ if (*fg < 0 || *fg > 15) {
+ *fg = *bg == 0 ? current_theme->default_color :
+ current_theme->default_real_color;
}
if (flags & PRINTFLAG_REVERSE) {
@@ -302,7 +303,7 @@ static void get_colors(int flags, int *fg, int *bg)
if (*fg == 8) *fg |= ATTR_COLOR8;
if (flags & PRINTFLAG_BOLD) {
- if (*fg == 0) *fg = current_theme->default_bold_color;
+ if (*fg == 0) *fg = current_theme->default_real_color;
*fg |= 8;
}
if (flags & PRINTFLAG_UNDERLINE) *fg |= ATTR_UNDERLINE;