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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4f5adbd34 system/readline: Fix espace sequence returning to user 
console
4f5adbd34 is described below

commit 4f5adbd34698c507e3aa842a213613d455211fac
Author: Alan Carvalho de Assis <[email protected]>
AuthorDate: Thu Aug 6 09:27:45 2026 -0300

    system/readline: Fix espace sequence returning to user console
    
    This commit fixes the issue:
    https://github.com/apache/nuttx-apps/issues/3680
    
    Signed-off-by: Alan C. Assis <[email protected]>
    Assisted-by: Claude Code
---
 system/readline/readline_common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/system/readline/readline_common.c 
b/system/readline/readline_common.c
index 1642e035e..872fcf768 100644
--- a/system/readline/readline_common.c
+++ b/system/readline/readline_common.c
@@ -1598,7 +1598,10 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, 
FAR char *buf,
 
               buf[cursor] = (char)ch; nch++; cursor++;
 #  ifdef CONFIG_READLINE_ECHO
-              redraw_tail(vtbl, buf, nch, cursor);
+              if (cursor < nch)
+                {
+                  redraw_tail(vtbl, buf, nch, cursor);
+                }
 #  endif
             }
 #else

Reply via email to