diff options
Diffstat (limited to 'gdb/tui/tui.c')
-rw-r--r-- | gdb/tui/tui.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 2c7a6a0..01aee2f 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -125,6 +125,19 @@ tui_rl_switch_mode (int notused1, int notused2) } else { + /* If we type "foo", entering it into the readline buffer + + (gdb) foo + ^ + and then switch to TUI and back, we may get back + + (gdb) foo + ^ + which is confusing because "foo" is no longer part of the + readline buffer. Fix this by clearing it before switching to + TUI. */ + rl_clear_visible_line (); + /* If tui_enable throws, we'll re-prep below. */ rl_deprep_terminal (); tui_enable (); @@ -618,9 +631,7 @@ tui_get_command_dimension (unsigned int *width, return true; } -void _initialize_tui (); -void -_initialize_tui () +INIT_GDB_FILE (tui) { struct cmd_list_element **tuicmd; |