aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-io.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-04-12 16:49:29 +0100
committerPedro Alves <palves@redhat.com>2016-04-12 16:50:59 +0100
commitab33ab13aa093778263d554dd0e702814a5a8cbd (patch)
tree72b8bf4f4a123ef18b267a240df0580cc96eadce /gdb/tui/tui-io.c
parentfaa4ebe148cfe83f06d881cfc80d95575d3bf746 (diff)
downloadgdb-ab33ab13aa093778263d554dd0e702814a5a8cbd.zip
gdb-ab33ab13aa093778263d554dd0e702814a5a8cbd.tar.gz
gdb-ab33ab13aa093778263d554dd0e702814a5a8cbd.tar.bz2
TUI: check whether in secondary prompt instead of immediate_quit
As can be seen in the tui_redisplay_readline comment: "The command could call prompt_for_continue and we must not restore SingleKey so that the prompt and normal keymap are used." immediate_quit is being used as proxy for "secondary prompt". We have a better predicate nowadays, so use it. gdb/ChangeLog: 2016-04-12 Pedro Alves <palves@redhat.com> * tui/tui-io.c (tui_redisplay_readline): Check gdb_in_secondary_prompt_p instead of immediate_quit. * tui/tui.c: Include top.h. (tui_rl_startup_hook): Check gdb_in_secondary_prompt_p instead of immediate_quit.
Diffstat (limited to 'gdb/tui/tui-io.c')
-rw-r--r--gdb/tui/tui-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index 18c648c..3fa32db 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -212,7 +212,7 @@ tui_redisplay_readline (void)
The command could call prompt_for_continue and we must not
restore SingleKey so that the prompt and normal keymap are used. */
if (tui_current_key_mode == TUI_ONE_COMMAND_MODE && rl_end == 0
- && immediate_quit == 0)
+ && !gdb_in_secondary_prompt_p ())
tui_set_key_mode (TUI_SINGLE_KEY_MODE);
if (tui_current_key_mode == TUI_SINGLE_KEY_MODE)