aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-09-03 20:47:48 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-09-03 20:47:48 +0000
commit8cee930b679ee004162d9a6b3b35f2064bbf9271 (patch)
treec3caf50dd7ffbcdbf976a54c23fae27a061a91da /gdb/tui/tui.c
parent38fc42c80d8ff9d2ca12e20d8f164e8f2f4693d3 (diff)
downloadgdb-8cee930b679ee004162d9a6b3b35f2064bbf9271.zip
gdb-8cee930b679ee004162d9a6b3b35f2064bbf9271.tar.gz
gdb-8cee930b679ee004162d9a6b3b35f2064bbf9271.tar.bz2
* tuiIO.c (tui_putc): New function to print one character.
(printable_part): New function from readline/complete.c. (PUTX): New macro, likewise. (print_filename): New function, likewise. (get_y_or_n): New function, likewise and adapted for TUI. (tui_rl_display_match_list): New function from readline/complete.c and writes on TUI command window. (tui_setup_io): Install or remove the readline hook rl_completion_display_matches_hook so that completion is written directly in TUI command window instead of in the TUI pipe. (tui_initialize_io): Use #ifdef TUI_USE_PIPE_FOR_READLINE for the TUI redirection pipe. (tui_getc): Likewise for call to tui_readline_output. (tui_readline_output): Likewise for function. * tui.c (tui_rl_startup_hook): Always take care of gdb prompt.
Diffstat (limited to 'gdb/tui/tui.c')
-rw-r--r--gdb/tui/tui.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index bb2590a..8bf467d 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -270,12 +270,10 @@ tui_rl_next_keymap (void)
static int
tui_rl_startup_hook ()
{
- rl_already_prompted = (tui_current_key_mode != tui_command_mode);
- if (rl_already_prompted)
- {
- tui_set_key_mode (tui_single_key_mode);
- tui_redisplay_readline ();
- }
+ rl_already_prompted = 1;
+ if (tui_current_key_mode != tui_command_mode)
+ tui_set_key_mode (tui_single_key_mode);
+ tui_redisplay_readline ();
return 0;
}