From 3350a896ed50db4d9e3824e595795fba8a5a0a86 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 13 Nov 2014 21:35:58 +0000 Subject: [PATCH] change the colour of strings - does not seem to apply to all strangely, will dig further into CLANG tokens later --- src/bin/editor/edi_editor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 4ab6155..2c756f9 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -24,7 +24,7 @@ static Edi_Color EDI_COLOR_FOREGROUND = ""; static Edi_Color EDI_COLOR_COMMENT = ""; -//static Edi_Color EDI_COLOR_STRING = ""; +static Edi_Color EDI_COLOR_STRING = ""; static Edi_Color EDI_COLOR_NUMBER = "";// font_weight=Bold"; static Edi_Color EDI_COLOR_BRACE = ""; static Edi_Color EDI_COLOR_TYPE = ""; @@ -411,7 +411,10 @@ _clang_load_highlighting(const char *path, Edi_Editor *editor) } break; case CXToken_Literal: - color = EDI_COLOR_NUMBER; + if (cursors[i].kind == CXCursor_StringLiteral || cursors[i].kind == CXCursor_CharacterLiteral) + color = EDI_COLOR_STRING; + else + color = EDI_COLOR_NUMBER; break; case CXToken_Comment: color = EDI_COLOR_COMMENT;