aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiIO.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-08-31 12:02:14 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-08-31 12:02:14 +0000
commite09d2eba9e1ebda1f5a50fe14e34941c22e09173 (patch)
tree13671ea7da53fcc70a55eaed71c59580e74e03c7 /gdb/tui/tuiIO.c
parentf5ad01299e7a0ae637936bc03108df1e59b3ce42 (diff)
downloadgdb-e09d2eba9e1ebda1f5a50fe14e34941c22e09173.zip
gdb-e09d2eba9e1ebda1f5a50fe14e34941c22e09173.tar.gz
gdb-e09d2eba9e1ebda1f5a50fe14e34941c22e09173.tar.bz2
2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
* tui.c (tui_commands): Table of single key commands. (tui_rl_command_key): New function to execute gdb command. (tui_rl_command_mode): New function to temporarily leave SingleKey. (tui_rl_next_keymap): New function to enter/leave the SingleKey mode. (tui_rl_startup_hook): New function to avoid prompt display by readline functions. (tui_set_key_mode): New function to set the key mode and install the readline keymap. (tui_initialize_readline): Create TUI SingleKey readline map. (tui_enable): Install rl_startup_hook. (tui_disable): Remove it. * tui.h (enum tui_key_mode): Declare. (tui_set_key_mode, tui_current_key_mode): Declare. * tuiIO.c (tui_redisplay_readline): Don't display the prompt in SingleKey mode. * tuiIO.h (tui_redisplay_readline): Declare.
Diffstat (limited to 'gdb/tui/tuiIO.c')
-rw-r--r--gdb/tui/tuiIO.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c
index fe389af..c48565c 100644
--- a/gdb/tui/tuiIO.c
+++ b/gdb/tui/tuiIO.c
@@ -44,6 +44,7 @@
#include "terminal.h"
#include "target.h"
#include "event-loop.h"
+#include "event-top.h"
#include "command.h"
#include "top.h"
#include "readline/readline.h"
@@ -151,7 +152,7 @@ tui_puts (const char *string)
/* Readline callback.
Redisplay the command line with its prompt after readline has
changed the edited text. */
-static void
+void
tui_redisplay_readline (void)
{
int prev_col;
@@ -164,7 +165,10 @@ tui_redisplay_readline (void)
char *prompt;
int start_line;
- prompt = get_prompt ();
+ if (tui_current_key_mode == tui_single_key_mode)
+ prompt = "";
+ else
+ prompt = get_prompt ();
c_pos = -1;
c_line = -1;