Some background mIRC colours would make irssi blink on certain terminals.
With some help I tracked down the source of this to be the 0x08 bit set.
Apparently, on some terminals, including the Linux text console, and the KDE
konsole, this bit means "blink", but on other terminals (including rxvt and
the Linux framebuffer console) it provides 8 more shades of the same colours
(as with the foreground colours).
This patch will when applied by default do nothing compared to vanilla irssi,
but when activated with /set mirc_blink_fix ON, it will strip the 0x08 bit
off the background colours. This will stop the blinking on the terminals
which blink when the 0x08 bit is set on colours, but also reduce the amount
of colours irssi uses on the other kind of terminal.
An easy way to check if irssi needs this patch on your favorite terminal, is
to try the colour 4,1 ([Ctrl+C]4,1test). If the word "test" blinks, you need
this patch.
If it doesn't blink, your terminal is not of the kind which blinks when the
0x08 bit is set, and you shouldn't enable this patch. If you do, it will
reduce the accuracy of colour representation even further.
Hope this will eliminate insanity and headaches caused by blinking text for
all of you. :)
Please tell me if you have any trouble with this patch, although it's so
trivial that technically there's probably nothing that can go wrong with it ;)
--
Per von Zweigbergk <[EMAIL PROTECTED]>
diff -r -u irssi-0.8.1.orig/src/fe-text/gui-printtext.c irssi-0.8.1/src/fe-text/gui-printtext.c
--- irssi-0.8.1.orig/src/fe-text/gui-printtext.c Sun Feb 17 16:10:09 2002
+++ irssi-0.8.1/src/fe-text/gui-printtext.c Sun Feb 17 22:34:43 2002
@@ -145,6 +145,8 @@
colors wrap to 0, 1, ... */
if (*bg >= 0) *bg = mirc_colors[*bg % 16];
if (*fg >= 0) *fg = mirc_colors[*fg % 16];
+ if (settings_get_bool("mirc_blink_fix"))
+ *bg &= ~0x08;
}
if (*fg < 0 || *fg > 15)
diff -r -u irssi-0.8.1.orig/src/fe-text/term.c irssi-0.8.1/src/fe-text/term.c
--- irssi-0.8.1.orig/src/fe-text/term.c Sun Feb 17 16:48:32 2002
+++ irssi-0.8.1/src/fe-text/term.c Sun Feb 17 22:34:04 2002
@@ -138,6 +138,7 @@
settings_add_bool("lookandfeel", "colors", TRUE);
settings_add_bool("lookandfeel", "term_force_colors", FALSE);
settings_add_bool("lookandfeel", "term_auto_detach", FALSE);
+ settings_add_bool("lookandfeel", "mirc_blink_fix", FALSE);
settings_add_str("lookandfeel", "term_type", "8bit");
force_colors = FALSE;