mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-12 13:40:16 +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
6818ec4d22
commit
5779652d3d
3 changed files with 28 additions and 16 deletions
|
|
@ -88,8 +88,9 @@ extern "C"
|
|||
*
|
||||
* If a prompt string is used by the application, then the application
|
||||
* must provide the prompt string to readline() by calling this function.
|
||||
* This is needed only for tab completion in cases where is it necessary
|
||||
* to reprint the prompt string.
|
||||
* This is needed for tab completion, and for line editing's full-line
|
||||
* redraws (Home, End, history recall, ...), in cases where it is
|
||||
* necessary to reprint the prompt string.
|
||||
*
|
||||
* Input Parameters:
|
||||
* prompt - The prompt string. This function may then be
|
||||
|
|
@ -108,7 +109,7 @@ extern "C"
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_READLINE_TABCOMPLETION
|
||||
#if defined(CONFIG_READLINE_TABCOMPLETION) || defined(CONFIG_READLINE_EDIT)
|
||||
FAR const char *readline_prompt(FAR const char *prompt);
|
||||
#else
|
||||
# define readline_prompt(p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue