client: Rewrite workaround for readline

Instead of calling display(""), explicitly use the sequence of
commands to force readline to properly update its internal state
and re-display the prompt.
This commit is contained in:
Tim Kourt 2020-04-08 16:14:07 -07:00 committed by Denis Kenzior
parent 848897ec17
commit 61e8a640b1
1 changed files with 8 additions and 1 deletions

View File

@ -534,7 +534,14 @@ void display_enable_cmd_prompt(void)
rl_set_prompt(IWD_PROMPT);
display("");
/*
* The following sequence of rl_* commands forces readline to properly
* update its internal state and re-display the new prompt.
*/
rl_save_prompt();
rl_redisplay();
rl_restore_prompt();
rl_forced_update_display();
}
void display_disable_cmd_prompt(void)