From 7a7d220fc85f5051fc16ea7b3e7fcf02a3daf06b Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Sat, 15 Mar 2014 15:32:16 +0900 Subject: [PATCH] editor - fixed side effect by 50a975b0ce77c21b61c738d784415b764d9aeaff since the \ tag appending order is changed. these functions should be updated also. --- src/bin/edc_editor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/edc_editor.c b/src/bin/edc_editor.c index 709bee1..87f0015 100644 --- a/src/bin/edc_editor.c +++ b/src/bin/edc_editor.c @@ -39,7 +39,7 @@ line_increase(edit_data *ed) char buf[MAX_LINE_DIGIT_CNT]; ed->line_max++; - snprintf(buf, sizeof(buf), "%d
", ed->line_max); + snprintf(buf, sizeof(buf), "
%d", ed->line_max); elm_entry_entry_append(ed->en_line, buf); } @@ -832,9 +832,11 @@ edit_edc_read(edit_data *ed, const char *file_path) } //Read last lines. - int line_num = 2; + int line_num = 1; EINA_ITERATOR_FOREACH(itr, line) { + line_num++; + //Append line number sprintf(buf, "
%d", line_num); if (!eina_strbuf_append(strbuf_line, buf)) goto err; @@ -843,8 +845,6 @@ edit_edc_read(edit_data *ed, const char *file_path) if (!eina_strbuf_append(strbuf_edit, "
")) goto err; if (!eina_strbuf_append_length(strbuf_edit, line->start, line->length)) goto err; - - line_num++; } 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));