hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=285c2ff5308707e7628ea4e4e61e3d9b14fed564
commit 285c2ff5308707e7628ea4e4e61e3d9b14fed564 Author: ChunEon Park <[email protected]> Date: Sat May 31 17:31:23 2014 +0900 editor - fix confiction between amp and escaped words. When texts includes '&' symbol, it missed the character in editor. Now the logic is considered to recognize it correctly. --- data/color/color.src | 2 +- src/bin/edc_editor.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/data/color/color.src b/data/color/color.src index 985fd02..94709a4 100644 --- a/data/color/color.src +++ b/data/color/color.src @@ -18,7 +18,7 @@ group "syntax_color_group" struct { value "key" string: ")"; value "key" string: "!"; value "key" string: "="; - value "key" string: "&"; + value "key" string: "&"; value "key" string: "|"; value "key" string: "\\"; } diff --git a/src/bin/edc_editor.c b/src/bin/edc_editor.c index 3ee15ce..bb8ff50 100644 --- a/src/bin/edc_editor.c +++ b/src/bin/edc_editor.c @@ -1027,7 +1027,7 @@ edit_edc_read(edit_data *ed, const char *file_path) if (eina_iterator_next(itr, (void **)(void *)&(line))) { line_num = 1; - if (!eina_strbuf_append(strbuf_line, "1")) goto err; + if (!eina_strbuf_append_char(strbuf_line, '1')) goto err; if (!eina_strbuf_append_length(strbuf_edit, line->start, line->length)) goto err; } @@ -1038,16 +1038,24 @@ edit_edc_read(edit_data *ed, const char *file_path) line_num++; //Append line number - sprintf(buf, "<br/>%d", line_num); + sprintf(buf, "\n%d", line_num); if (!eina_strbuf_append(strbuf_line, buf)) goto err; //Append edc ccde - if (!eina_strbuf_append(strbuf_edit, EOL)) goto err; + if (!eina_strbuf_append_char(strbuf_edit, '\n')) goto err; if (!eina_strbuf_append_length(strbuf_edit, line->start, line->length)) goto err; } - elm_entry_entry_append(ed->en_line, eina_strbuf_string_get(strbuf_line)); - elm_entry_entry_append(ed->en_edit, eina_strbuf_string_get(strbuf_edit)); + char *markup_line = + elm_entry_utf8_to_markup(eina_strbuf_string_get(strbuf_line)); + char *markup_edit = + elm_entry_utf8_to_markup(eina_strbuf_string_get(strbuf_edit)); + + elm_entry_entry_append(ed->en_line, markup_line); + elm_entry_entry_append(ed->en_edit, markup_edit); + + free(markup_line); + free(markup_edit); ed->line_max = line_num; Eina_Stringshare *group_name = --
