jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=992b50cc9b7f915a0b707033a62a347b1ca18372

commit 992b50cc9b7f915a0b707033a62a347b1ca18372
Author: Jaehyun Cho <[email protected]>
Date:   Mon Feb 16 18:55:08 2015 +0900

    syntax_color: Set white to default text color.
    
    Set white to default text color to not change text color when entry is 
disabled.
---
 src/lib/syntax_color.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/lib/syntax_color.c b/src/lib/syntax_color.c
index 1fe0dfb..a7dcf03 100644
--- a/src/lib/syntax_color.c
+++ b/src/lib/syntax_color.c
@@ -904,17 +904,14 @@ color_apply(color_data *cd, const char *src, int length, 
char *from, char *to)
         if (to && (cur > to)) goto finished;
      }
 
-   //Same with origin source.
-   if (prev == src)
-     str = src;
-   //Some color syntax is applied.
-   else
-     {
 finished:
-        //append leftovers.
-        if (prev < cur) eina_strbuf_append(strbuf, prev);
-        str = eina_strbuf_string_get(strbuf);
-     }
+   //append leftovers.
+   if ((prev == src) || (prev < cur)) eina_strbuf_append(strbuf, prev);
+
+   //prepend default color(white).
+   eina_strbuf_prepend(strbuf, "<color=#FFFFFFFF>");
+   eina_strbuf_append(strbuf, "</color>");
+   str = eina_strbuf_string_get(strbuf);
 
    macro_keys_free(cd);
 

-- 


Reply via email to