You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/01/08 21:40:34 UTC

[incubator-nuttx-apps] branch master updated: delete all characters from char to EOL

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 7fd1b90  delete all characters from char to EOL
7fd1b90 is described below

commit 7fd1b9065bcc7c3b5ae18294b957e67435e6cbe1
Author: Adam Feuer <ad...@starcat.io>
AuthorDate: Wed Jan 8 13:28:34 2020 -0800

    delete all characters from char to EOL
    
    - more like GNU readline or emacs - can delete entire line with
      ctrl-A ctrl-K
---
 system/cle/cle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/cle/cle.c b/system/cle/cle.c
index 548ce98..42272f3 100644
--- a/system/cle/cle.c
+++ b/system/cle/cle.c
@@ -1076,7 +1076,7 @@ static int cle_editloop(FAR struct cle_s *priv)
 
         case KEY_DELEOL:  /* Delete to the end of the line */
           {
-            priv->nchars = (priv->nchars > 0 ? priv->curpos + 1 : 0);
+            priv->nchars = (priv->nchars > 0 ? priv->curpos : 0);
           }
           break;