indent: Fix to paste a word at correct position.

Do not apply indentation when pasted string does not contain keywords
which cause a new line. (e.g. string not containing ';')

Test Plan:
1. Open basic.edc
2. Copy "default"
3. Paste at the same position.
This commit is contained in:
Jaehyun Cho 2016-03-14 14:45:37 +09:00
parent fa76bf2aee
commit f26e60d624
1 changed files with 4 additions and 1 deletions

View File

@ -393,8 +393,11 @@ indent_code_lines_create(indent_data *id EINA_UNUSED, const char *utf8)
}
utf8_ptr++;
}
//FIXME: Now string is not added to code line and indentation is not applied
// if string does not contain keywords which cause a new line.
// (e.g. string not containing ';')
//Append rest of the input string.
if (utf8_lexem > utf8_append_ptr)
if (utf8_append_ptr && (utf8_lexem > utf8_append_ptr))
code_lines = eina_list_append(code_lines,
eina_stringshare_add(utf8_lexem));