aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-io.c')
-rw-r--r--gdb/tui/tui-io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index 0e53350..9191cca 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -609,6 +609,12 @@ gdb_wgetch (WINDOW *win)
nonl ();
int r = wgetch (win);
nl ();
+ /* In nonl mode, if the user types Enter, it will not be echoed
+ properly. This will result in gdb output appearing immediately
+ after the command. So, if we read \r, emit a \r now, after nl
+ mode has been re-entered, so that the output looks correct. */
+ if (r == '\r')
+ puts ("\r");
return r;
}