summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-09 16:58:52 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-09 16:58:52 +0000
commit3fd3a03402c41f9e31bff05120e9c668cf3c2dc2 (patch)
tree024370d553661b45472bd59e19be1de5cc4f44a3 /src/fe-common
parent6ee0a40abb6d32221bfdb6dc0d995d8e7cd44233 (diff)
downloadirssi-3fd3a03402c41f9e31bff05120e9c668cf3c2dc2.zip
Beeps should work(?). ANSI colors had some bugs, bolds weren't working and
blinking crashed irssi. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@305 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/printtext.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c
index 7ddc33b4..7e525202 100644
--- a/src/fe-common/core/printtext.c
+++ b/src/fe-common/core/printtext.c
@@ -144,14 +144,15 @@ static char *convert_ansi(char *str, int *fgcolor, int *bgcolor, int *flags)
/* reset colors back to default */
fg = current_theme->default_color;
bg = -1;
+ fl &= ~(PRINTFLAG_BEEP|PRINTFLAG_INDENT);
break;
case 1:
/* hilight */
- fg |= 8;
+ fl |= PRINTFLAG_BOLD;
break;
case 5:
/* blink */
- bg = bg == -1 ? 8 : bg | 8;
+ fl |= PRINTFLAG_BLINK;
break;
case 7:
/* reverse */
@@ -171,7 +172,7 @@ static char *convert_ansi(char *str, int *fgcolor, int *bgcolor, int *flags)
if (*str == 'm') {
if (!hide_text_style) {
*fgcolor = fg;
- *bgcolor = bg == -1 ? -1 : bg;
+ *bgcolor = bg;
*flags = fl;
}
str++;