indent: Fix to preserve separate code lines

If copied code lines are in the separate lines, then paste those code
lines in the separate lines.

<Test Case>
1. Copy the following in edc.
"TILED_HORIZ(120)
visible: 0;"
2. Paste

<Test Result>
Previously, those code lines are pasted in the same line.
Now, those code lines are pasted in the separate lines like original
code lines.
This commit is contained in:
Jaehyun Cho 2016-02-17 20:38:20 +09:00
parent f2d889dbf7
commit f98127a485
1 changed files with 10 additions and 1 deletions

View File

@ -269,7 +269,16 @@ indent_text_auto_format(indent_data *id EINA_UNUSED,
while (utf8_ptr < utf8_end)
{
if (*utf8_ptr == '{' || *utf8_ptr == '}' || *utf8_ptr == ';')
if (*utf8_ptr == '\n')
{
code_lines = eina_list_append(code_lines,
eina_stringshare_add_length(utf8_lexem,
utf8_ptr - utf8_lexem));
utf8_append_ptr = utf8_ptr;
break;
}
else if (*utf8_ptr == '{' || *utf8_ptr == '}' ||
*utf8_ptr == ';')
{
if (*utf8_ptr == '{')
{