aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-interp.c9
-rw-r--r--gdb/tui/tui-io.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 452dd20..85bb26d 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "cli/cli-interp.h"
#include "interps.h"
#include "top.h"
#include "event-top.h"
@@ -219,6 +220,7 @@ tui_init (struct interp *self, int top_level)
static int
tui_resume (void *data)
{
+ struct ui *ui = current_ui;
struct ui_file *stream;
/* gdb_setup_readline will change gdb_stdout. If the TUI was
@@ -232,7 +234,9 @@ tui_resume (void *data)
stream = NULL;
}
- gdb_setup_readline ();
+ gdb_setup_readline (1);
+
+ ui->input_handler = command_line_handler;
if (stream != NULL)
cli_out_set_stream (tui_old_uiout, gdb_stdout);
@@ -274,7 +278,8 @@ static const struct interp_procs tui_interp_procs = {
tui_exec,
tui_ui_out,
NULL,
- cli_command_loop
+ cli_command_loop,
+ cli_interpreter_supports_command_editing,
};
/* Factory for TUI interpreters. */
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index 3fa32db..6f2d892 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -616,7 +616,7 @@ tui_getc (FILE *fp)
if (ch == KEY_BACKSPACE)
return '\b';
- if (async_command_editing_p && key_is_start_sequence (ch))
+ if (current_ui->command_editing && key_is_start_sequence (ch))
{
int ch_pending;