+2019-12-20 Tom Tromey <tom@tromey.com>
+
+ PR tui/23619:
+ * tui/tui-io.c (tui_rl_saved_prompt): Remove.
+ (tui_redisplay_readline): Use rl_display_prompt.
+ (tui_prep_terminal): Update.
+
2019-12-19 Christian Biesinger <cbiesinger@google.com>
* configure: Regenerate.
static int tui_readline_pipe[2];
#endif
-/* The last gdb prompt that was registered in readline.
- This may be the main gdb prompt or a secondary prompt. */
-static char *tui_rl_saved_prompt;
-
/* Print a character in the curses command window. The output is
buffered. It is up to the caller to refresh the screen if
necessary. */
if (tui_current_key_mode == TUI_SINGLE_KEY_MODE)
prompt = "";
else
- prompt = tui_rl_saved_prompt;
+ prompt = rl_display_prompt;
c_pos = -1;
c_line = -1;
static void
tui_prep_terminal (int notused1)
{
- /* Save the prompt registered in readline to correctly display it.
- (we can't use gdb_prompt() due to secondary prompts and can't use
- rl_prompt because it points to an alloca buffer). */
- xfree (tui_rl_saved_prompt);
- tui_rl_saved_prompt = rl_prompt != NULL ? xstrdup (rl_prompt) : NULL;
}
/* Readline callback to restore the terminal. It is called once each