From d5d3aa39f9476b2cbc2be0fffaf334b17a671720 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 23 May 2014 07:19:21 -0600 Subject: CLE: Was not returning the terminating newline character --- apps/system/cle/cle.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/system') diff --git a/apps/system/cle/cle.c b/apps/system/cle/cle.c index ca361c90c..2f1af2116 100644 --- a/apps/system/cle/cle.c +++ b/apps/system/cle/cle.c @@ -829,6 +829,9 @@ static int cle_editloop(FAR struct cle_s *priv) #if defined(CONFIG_EOL_IS_CR) case '\r': /* CR terminates line */ { + /* Add the newline character to the buffer */ + + cle_insertch(priv, '\n'); return OK; } break; @@ -841,6 +844,9 @@ static int cle_editloop(FAR struct cle_s *priv) #if defined(CONFIG_EOL_IS_LF) || defined(CONFIG_EOL_IS_BOTH_CRLF) case '\n': /* LF terminates line */ { + /* Add the newline character to the buffer */ + + cle_insertch(priv, '\n'); return OK; } break; @@ -850,6 +856,9 @@ static int cle_editloop(FAR struct cle_s *priv) case '\r': /* Either CR or LF terminates line */ case '\n': { + /* Add the newline character to the buffer */ + + cle_insertch(priv, '\n'); return OK; } break; -- cgit v1.2.3