diff options
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/gui-printtext.c | 10 | ||||
-rw-r--r-- | src/fe-text/gui-textwidget.c | 2 | ||||
-rw-r--r-- | src/fe-text/gui-windows.h | 1 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c index c53e4674..2f1d5be8 100644 --- a/src/fe-text/gui-printtext.c +++ b/src/fe-text/gui-printtext.c @@ -210,7 +210,9 @@ static void line_add_colors(GUI_WINDOW_REC *gui, int fg, int bg, int flags) unsigned char buffer[12]; int color, pos; - color = (fg & 0x0f) | (bg << 4); + /* color should never have last bit on or it would be treated as a + command! */ + color = (fg & 0x0f) | ((bg & 0x0f) << 4); pos = 0; if (((fg & ATTR_COLOR8) == 0 && (fg|(bg << 4)) != gui->last_color) || @@ -227,14 +229,12 @@ static void line_add_colors(GUI_WINDOW_REC *gui, int fg, int bg, int flags) buffer[pos++] = 0; buffer[pos++] = LINE_CMD_COLOR8; } - if (flags & PRINTFLAG_BEEP) { - buffer[pos++] = 0; - buffer[pos++] = LINE_CMD_BEEP; - } if (flags & PRINTFLAG_INDENT) { buffer[pos++] = 0; buffer[pos++] = LINE_CMD_INDENT; } + if (flags & PRINTFLAG_BEEP) + beep(); linebuf_add(gui, (char *) buffer, pos); diff --git a/src/fe-text/gui-textwidget.c b/src/fe-text/gui-textwidget.c index 49841479..27767fd7 100644 --- a/src/fe-text/gui-textwidget.c +++ b/src/fe-text/gui-textwidget.c @@ -76,8 +76,6 @@ static gchar *gui_window_line2text(LINE_REC *line) color &= 0xfff0; color |= 8|ATTR_COLOR8; break; - case LINE_CMD_BEEP: - break; case LINE_CMD_INDENT: break; } diff --git a/src/fe-text/gui-windows.h b/src/fe-text/gui-windows.h index 622b5f4a..2d1a9a96 100644 --- a/src/fe-text/gui-windows.h +++ b/src/fe-text/gui-windows.h @@ -18,7 +18,6 @@ enum { LINE_CMD_OVERFLOW, /* buffer overflow! */ LINE_CMD_COLOR8, /* change to dark grey, normally 8 = bold black */ LINE_CMD_UNDERLINE, /* enable/disable underlining */ - LINE_CMD_BEEP, /* beep */ LINE_CMD_INDENT /* if line is split, indent it at this position */ }; |