Using the +/- format application to remove bold etc where used.

This requires a patch from herdsman to evas to work effectively
This commit is contained in:
Andy Williams 2014-10-20 23:20:14 +01:00
parent 6cf6df3886
commit 9838f4b35c
1 changed files with 9 additions and 3 deletions

View File

@ -32,7 +32,7 @@ static Edi_Color EDI_COLOR_CLASS = "+ color=#72AAD4 font_weight=Bold";
static Edi_Color EDI_COLOR_FUNCTION = "+ color=#72AAD4 font_weight=Bold";
static Edi_Color EDI_COLOR_PARAM = "+ color=#ffffff";
static Edi_Color EDI_COLOR_KEYWORD = "+ color=#ff9900 font_weight=Bold";
static Edi_Color EDI_COLOR_PREPROCESSOR = "+ color=#00B000 font_weight=Bold";
static Edi_Color EDI_COLOR_PREPROCESSOR = "+ color=#00B000";
static Edi_Color EDI_COLOR_BACKGROUND = "+ backing_color=#000000";
static Edi_Color EDI_COLOR_SEVIRITY_IGNORED = "+ backing_color=#000000";
@ -280,13 +280,19 @@ _edi_editor_statusbar_add(Evas_Object *panel, Edi_Editor *editor, Edi_Mainview_I
static void
_edi_range_color_set(Edi_Editor *editor, Edi_Range range, Edi_Color color)
{
char *format;
format = strdup(color);
evas_textblock_cursor_line_set(_format_cursor, range.start.line - 1);
evas_textblock_cursor_pos_set(_format_cursor, evas_textblock_cursor_pos_get(_format_cursor) + range.start.col - 1);
evas_textblock_cursor_format_prepend(_format_cursor, color);
evas_textblock_cursor_format_prepend(_format_cursor, format);
format[0] = '-';
evas_textblock_cursor_line_set(_format_cursor, range.end.line - 1);
evas_textblock_cursor_pos_set(_format_cursor, evas_textblock_cursor_pos_get(_format_cursor) + range.end.col - 1);
evas_textblock_cursor_format_append(_format_cursor, EDI_COLOR_FOREGROUND);
evas_textblock_cursor_format_append(_format_cursor, format);
free(format);
}
static void