hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=d2e3c6dc6bff1b3b11e697ad49fcde7e0891cf91
commit d2e3c6dc6bff1b3b11e697ad49fcde7e0891cf91 Author: ChunEon Park <her...@hermet.pe.kr> Date: Sat Jul 4 01:08:01 2015 +0900 syntax_color: apply string syntax color prior to others. even if the comments are inside of the qutoes, the comments syntax color should not be applied. --- src/lib/syntax_color.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/syntax_color.c b/src/lib/syntax_color.c index bd432cd..ac0f47e 100644 --- a/src/lib/syntax_color.c +++ b/src/lib/syntax_color.c @@ -860,6 +860,20 @@ color_apply(color_data *cd, const char *src, int length, char *from, char *to) } } + //escape string: " ~ " + ret = string_apply(strbuf, &cur, &prev, cd->col_string, inside_string); + if (ret == 1) + { + inside_string = !inside_string; + continue; + } + + if (inside_string || inside_comment) + { + cur++; + continue; + } + //handle comment: /* ~ */ ret = comment_apply(strbuf, &src, length, &cur, &prev, cd->col_comment, &inside_comment); @@ -875,20 +889,6 @@ color_apply(color_data *cd, const char *src, int length, char *from, char *to) else if (ret == -1) goto finished; } - //escape string: " ~ " - ret = string_apply(strbuf, &cur, &prev, cd->col_string, inside_string); - if (ret == 1) - { - inside_string = !inside_string; - continue; - } - - if (inside_string || inside_comment) - { - cur++; - continue; - } - //handle comment: preprocessors, # ret = macro_apply(strbuf, &src, length, &cur, &prev, cd->col_macro, cd); if (ret == 1) continue; --