forked from enlightenment/enventor
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:
parent
842341bea2
commit
e940639079
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue