diff options
author | Ailin Nemui <ailin@esf51.localdomain> | 2014-07-31 02:34:18 +0200 |
---|---|---|
committer | Ailin Nemui <ailin@esf51.localdomain> | 2014-07-31 03:09:19 +0200 |
commit | b602372e78597bb8a670e4e2bd76acfcb72b21d8 (patch) | |
tree | f9f49918c44a600125db1d85e2fa21b0fae2659f /src/fe-text/gui-printtext.c | |
parent | 1933c92532702f5ec674159e8c70f98c596a475a (diff) | |
download | irssi-b602372e78597bb8a670e4e2bd76acfcb72b21d8.zip |
fix mirc_blink_fix
the background colours were totally off with mirc_blink_fix
enabled. oops.
reported by wodim
Diffstat (limited to 'src/fe-text/gui-printtext.c')
-rw-r--r-- | src/fe-text/gui-printtext.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c index cf6028b5..337d0739 100644 --- a/src/fe-text/gui-printtext.c +++ b/src/fe-text/gui-printtext.c @@ -158,8 +158,11 @@ static void get_colors(int flags, int *fg, int *bg, int *attr) if (*bg >= 0) { *bg = mirc_colors[*bg % 100]; flags &= ~GUI_PRINT_FLAG_COLOR_24_BG; - if (settings_get_bool("mirc_blink_fix")) - *bg = term_color256map[*bg&0xff] & ~0x08; + if (settings_get_bool("mirc_blink_fix")) { + if (*bg < 16) /* ansi bit flip :-( */ + *bg = (*bg&8) | (*bg&4)>>2 | (*bg&2) | (*bg&1)<<2; + *bg = term_color256map[*bg&0xff] & 7; + } } if (*fg >= 0) { *fg = mirc_colors[*fg % 100]; |