indent: Check '\r' when indented code line is created on Windows.

On Windows, new line is represented as "\r\n".
Therefore, '\r' is checked when indented code line is created.
Otherwise, unnecessary newlines are inserted after indentation on
Windows.
This commit is contained in:
Jaehyun Cho 2016-03-17 14:52:35 +09:00
parent 842341bea2
commit e940639079
1 changed files with 2 additions and 1 deletions

View File

@ -263,7 +263,8 @@ indent_code_lines_create(indent_data *id EINA_UNUSED, const char *utf8)
*/
while (utf8_ptr < utf8_end)
{
if (*utf8_ptr != ' ' && *utf8_ptr != '\t' && *utf8_ptr != '\n' )
if (*utf8_ptr != ' ' && *utf8_ptr != '\t' && *utf8_ptr != '\n' &&
*utf8_ptr != '\r')
{
//Renew the start position of lexeme.
if (!keep_lexem_start_pos) utf8_lexem = utf8_ptr;