From 0e294d5c2e4d4dd686378f2050abc9a9f2fae199 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Sun, 6 Nov 2011 20:40:25 +0100 Subject: add italics support; don't use standout for reverse --- src/fe-text/textbuffer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/fe-text/textbuffer.c') diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c index ad1b06f6..24ee62bc 100644 --- a/src/fe-text/textbuffer.c +++ b/src/fe-text/textbuffer.c @@ -322,6 +322,10 @@ void textbuffer_line_add_colors(TEXT_BUFFER_REC *buffer, LINE_REC **line, data[pos++] = 0; data[pos++] = LINE_CMD_BOLD; } + if ((flags & GUI_PRINT_FLAG_ITALIC) != (buffer->last_flags & GUI_PRINT_FLAG_ITALIC)) { + data[pos++] = 0; + data[pos++] = LINE_CMD_ITALIC; + } if (flags & GUI_PRINT_FLAG_INDENT) { data[pos++] = 0; data[pos++] = LINE_CMD_INDENT; @@ -501,6 +505,10 @@ void textbuffer_line2text(LINE_REC *line, int coloring, GString *str) g_string_append_printf(str, "\004%c", FORMAT_STYLE_BOLD); break; + case LINE_CMD_ITALIC: + g_string_append_printf(str, "\004%c", + FORMAT_STYLE_ITALIC); + break; case LINE_CMD_COLOR0: g_string_append_printf(str, "\004%c%c", '0', FORMAT_COLOR_NOCHANGE); -- cgit v1.2.3