mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
readline: Make prompt-caching available
readline cached the current prompt only when TAB completion was enabled, even though line-editing redraws also depend on that cached prompt. With TAB completion disabled, full-line redraws erased the prompt and repainted only the command buffer. Make the prompt cache available whenever line editing is enabled. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
parent
893f0c31ee
commit
48eb95998b
3 changed files with 28 additions and 16 deletions
|
|
@ -223,7 +223,7 @@ int nsh_session(FAR struct console_stdio_s *pstate,
|
|||
|
||||
write(OUTFD(pstate), nsh_prompt(), strlen(nsh_prompt()));
|
||||
|
||||
#ifdef CONFIG_READLINE_TABCOMPLETION
|
||||
#if defined(CONFIG_READLINE_TABCOMPLETION) || defined(CONFIG_READLINE_EDIT)
|
||||
/* Set the prompt so readline can redraw it for editing features */
|
||||
|
||||
readline_prompt(nsh_prompt());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue